+ Reply to Thread
Results 1 to 4 of 4

Perform calculation if two other columns contain specific values

  1. #1
    Forum Contributor heytherejem's Avatar
    Join Date
    07-06-2017
    Location
    Hampshire, England
    MS-Off Ver
    2016
    Posts
    152

    Perform calculation if two other columns contain specific values

    Hi there,

    It's been a while since I posted a question as i've been learning DAX. But i'm testing some data through excel and my excel learning has gone right out of my head.

    So I am creating a pass=1 and fail=0 column.

    This is calculated by IF(COLUMNA=>3,1,0)
    So column A contains a 0,1,2 it's produces a 1, but three plus is a 0

    I also want it to be blank if COLUMNA is blank.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Perform calculation if two other columns contain specific values

    Try something like this, if your data is in A2:

    =IF(A2="","",IF(A2>=3,0,1))

    Copy down as required.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor heytherejem's Avatar
    Join Date
    07-06-2017
    Location
    Hampshire, England
    MS-Off Ver
    2016
    Posts
    152

    Re: Perform calculation if two other columns contain specific values

    Thanks Pete! I thought I had trie that and it hadn't worked but I guess I had a wrong parenthesis or something.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Perform calculation if two other columns contain specific values

    Glad it worked for you - thanks for the rep.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA to perform sum of column values if number of rows and columns are not constant
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-17-2015, 09:40 AM
  2. How to perform calculation for multiple columns and rounding off using macro
    By raja15feb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-16-2014, 04:03 AM
  3. URGENT - How to match values in two columns then perform an action
    By VBAhelp3456 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-03-2014, 08:08 PM
  4. Macro to search multiple (static) columns and perform calculation on adjacent cells
    By DubaiExcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2013, 04:37 AM
  5. [SOLVED] How to perform automatic calculation of specific ranges in a column
    By thkatag in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-18-2012, 11:37 AM
  6. Replies: 2
    Last Post: 03-29-2011, 10:53 AM
  7. [SOLVED] comparing two columns & then perform a calculation
    By dazp1970 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2005, 09:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1