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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
prv_1401
Helper I
Helper I

DAX to eliminate blank values

Hi all, 
I have columns 'ID' and 'PO'
PO columns has values 0, 100 and blank cells.
I want the count of ID where PO = 0 (only). But even the blank gets counted.
I have used this dax to eliminate blank but still I dont get the output desired. I get blank value instead .
Please help.

SKUswith0 = CALCULATE(
    DISTINCTCOUNT('Master Data'[id]),
    'Master Data'[PO] = 0 && 'Master Data'[PO] <> BLANK())


@123abc @Ashish_Mathur 

2 REPLIES 2
Whitewater100
Solution Sage
Solution Sage

Hi: You can try this measure:

SKUswith0 = CALCULATE(COUNTA('Mater Data'[PO]), 'Mater Data'[PO] = 0)
Good luck!
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, change the data type of the PO column to Text.  Now try this measure

SKUswith0 = CALCULATE(DISTINCTCOUNT('Master Data'[id]),'Master Data'[PO] = "0")

If you do not want to change the data type, then try this measure

SKUswith0 = CALCULATE(DISTINCTCOUNT('Master Data'[id]),'Master Data'[PO] == 0)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.