Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PaulMac
Helper IV
Helper IV

DAX - Count Rows in 'Date' column where Status column = "Open"

Hi All

 

I found a DAX formula ther on the Power BI Forums [See it here] that allowed by to return 0 instead of BLANK

 

I tweaked this to be specifications and ended up with something like this:

 

Actual8week = IF (
    CALCULATE ( SUM ( All_Complaints[Date 8 Wk Due] ) ) = BLANK (),
    0,
    CALCULATE ( SUM ( All_Complaints[Date 8 Wk Due] ) )
)

 

This gave me a count of all my 8 week letters. I then had to use some visual level filters (as I stuggle with FILTER in DAX) to only count if the the Date 8 Wk Due is in TODAY.

 

This code works and gives me a 0 as expected. However utilising the same DAX code on my 4 week letters column give me a result of 44,501 which is odd as I only 1,400~ rows in the dataset!!??

 

What am I doing wrong here peeps?

 

Can anyone can help me write something that counts the numbers of rows in the Date 4 Wk Due if the value in the Status column = OPEN and will return 0 instead of BLANK when no value is returned?

 

Many thanks in advance.

 

PaulMac

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@PaulMac,

 

You may take a look at the following links.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@PaulMac,

 

You may take a look at the following links.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.