+ Reply to Thread
Results 1 to 7 of 7

DAX Countifs

  1. #1
    Forum Contributor
    Join Date
    06-24-2004
    MS-Off Ver
    Excel 2013 Pro Plus
    Posts
    122

    DAX Countifs

    Hello friends, Hope all is well!

    Please help me make a DAX formula that captures the same function of the below countifs formula:

    =IF(COUNTIFS($D$2:$D$13,D2,$C$2:$C$13,"",$A$2:$A$13,A2)>0,1,0)

    Col D: Type
    Col C: Value
    Col A: Year

    the attachment here should clarify; in the end if blank appears in any cell, then cell related to the "Type" and "year" will become 1.

    Thank you so much in advance!
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: DAX Countifs

    How about just telling us what you are trying to achieve?
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor
    Join Date
    06-24-2004
    MS-Off Ver
    Excel 2013 Pro Plus
    Posts
    122

    Re: DAX Countifs

    good question. I am trying to make a powerpivot. that will hide rows if all values dont have blanks.
    I want the pivot to show the rows that have 1 or more blanks.

    Please help me change the formula to a DAX formula:
    =IF(COUNTIFS($D$2:$D$13,D2,$C$2:$C$13,"",$A$2:$A$13,A2)>0,1,0)

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: DAX Countifs

    No, what I mean, what are you trying to accomplish in column E and why does it need to be a DAX formula. Won't a formula that works suffice?

    In column E I see all "zeros" for A in column D and "ones" for B in column D. Can you clarify?

  5. #5
    Forum Contributor
    Join Date
    06-24-2004
    MS-Off Ver
    Excel 2013 Pro Plus
    Posts
    122

    Re: DAX Countifs

    the formula works, but I am trying to automate the process as much as possible. people around me may forget, and the report will be a mess.

    Regarding the question: Yes zeros = no issues, no blanks found. ones= cells of B found at least 1 blank, so all Bs in year 2019 will have = 1s.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: DAX Countifs

    Sorry, I'm not following here so I've put a call into the experts to see if they can help.

  7. #7
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: DAX Countifs

    Presumably you want this as a calculated column, so that you can use as a filter.

    So, use:

    Please Login or Register  to view this content.
    This will return TRUE if blank SAR values are found for the Year / Type combination, and FALSE if no blank SAR values found.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

+ 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. Replies: 6
    Last Post: 03-19-2019, 09:14 PM
  2. [SOLVED] Sumproduct to replace countifs as countifs don't work on external source reference
    By KrishnaSagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2017, 02:33 AM
  3. How can I run CountIfs + CountIfs without double counting?
    By hiitsjessie in forum Excel General
    Replies: 1
    Last Post: 02-06-2017, 04:49 PM
  4. [SOLVED] Countifs + Countifs - replacement?
    By JulieQ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-05-2015, 03:02 PM
  5. COUNTIFS OR COUNTIFS needs to work
    By joshbellfi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-23-2013, 10:55 AM
  6. COUNTIFS OR...multiple countifs without duplication in the numbers
    By HooligaD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 09:53 AM
  7. Replies: 0
    Last Post: 12-16-2011, 09:01 AM

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