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
Anonymous
Not applicable

Filter NULL Value

Hi Guys

 

I'm trying to filter my datecompleted = NULL by using below dax, unfortunately it didn't help. Could anyone pls advise if anything wrong with my dax? 

#NULL Datecompleted =
VAR TotalRow = COUNTROWS(VALUES(swEqptHistory[WorkOrderID]))
Return
CALCULATE(TotalRow,FILTER(swEqptHistory,swEqptHistory[DateCompleted] = BLANK())
)
1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Try to create a measure like below:

Measure = CALCULATE(COUNT(Table1[WorkOrderID]),Table1[DateCompleted]=BLANK())

count.PNG

 

Best Regards,

Icey

 

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

9 REPLIES 9
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Is this problem solved?


If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


If not, please share me a dummy .pbix file, removing sensitive information. It is suggested to upload your file to OneDrive for Business and then paste the link here.

 


Best Regards,
Icey

Anonymous
Not applicable

Hi Icey

 

unfortunately it still cant get the desired result. I need to get the count of WorkorderID which datecompleted = NULL. I had exported out part of my data in XLXS format. Appreaciate if u can help. 

the end result should be below SS when i used filter pane.

 

 

 

https://1drv.ms/x/s!Au9T7Qp34vJEjRFcmMn0swfEkOS1?e=dbB1pr

image.png

Icey
Community Support
Community Support

Hi @Anonymous ,

 

Try to create a measure like below:

Measure = CALCULATE(COUNT(Table1[WorkOrderID]),Table1[DateCompleted]=BLANK())

count.PNG

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks @Icey , it works. However, i have another question. Instead of count, i just want to filter the rows that datecomplete = blank().

i tried using this 

CALCULATE(FILTER(swEqptHistory,swEqptHistory[DateCompleted] = 0),swEqptHistory[WorkOrderID]) but didnt work. Can you advise?


Icey
Community Support
Community Support

Hi @Anonymous ,

 

It is suggested to use a Filter or Slicer.

filter.jpg

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks a lot @Icey .

 

Cheers!

amitchandak
Super User
Super User

@Anonymous 

#NULL Datecompleted =
VAR TotalRow = COUNTROWS(VALUES(swEqptHistory[WorkOrderID]))
Return
CALCULATE(TotalRow,FILTER(swEqptHistory,isblank(swEqptHistory[DateCompleted]) )
)

OR

#NULL Datecompleted =
VAR TotalRow = COUNTROWS(VALUES(swEqptHistory[WorkOrderID]))
Return
CALCULATE(TotalRow,FILTER(swEqptHistory,swEqptHistory[DateCompleted] == BLANK())
)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Hi

 

Unfortunately it still didnt work.  The output should be like below, i'm using manual input in filter pane.

image.png

 

@Anonymous , try this setting too

ShowItemwithoutdata.JPG

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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!

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.