Reply
Lauraeire_81
Regular Visitor
Partially syndicated - Outbound

Where values are blank()

Hi

I've created a measure where I need it to calculate distinct count of values where values are 'yes', if filter is selected and 0 if no filter.

I would like to show '0' or 'No values' if there are no values of "yes" as I continue to get Blanks if this is the case.

 

Here is my current measure:

Measure 5 =
IF(ISFILTERED('Report Results'[Systems]),
CALCULATE(
        DISTINCTCOUNT( 'Report Results'[ServerN]),
        'Report Results'[Out of Support] = "yes"),
  0
)
 

Thanks in advance,

Laura

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

Syndicated - Outbound

@Lauraeire_81 Try using

 

DAX
Measure 5 =
IF(
ISFILTERED('Report Results'[Systems]),
IF(
ISBLANK(
CALCULATE(
DISTINCTCOUNT('Report Results'[ServerN]),
'Report Results'[Out of Support] = "yes"
)
),
0,
CALCULATE(
DISTINCTCOUNT('Report Results'[ServerN]),
'Report Results'[Out of Support] = "yes"
)
),
0
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
Super User

Syndicated - Outbound

@Lauraeire_81 Try using

 

DAX
Measure 5 =
IF(
ISFILTERED('Report Results'[Systems]),
IF(
ISBLANK(
CALCULATE(
DISTINCTCOUNT('Report Results'[ServerN]),
'Report Results'[Out of Support] = "yes"
)
),
0,
CALCULATE(
DISTINCTCOUNT('Report Results'[ServerN]),
'Report Results'[Out of Support] = "yes"
)
),
0
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Syndicated - Outbound

Thanks this is perfect.

 

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)