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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Dax measure not working with filters

Hi,

 

I have created this measure on multiple datasets with no issue, but for some reason I can not get it to work on the dataset I'm currently working on.

I am trying to calculate the number of records in the "Review" workflow status - though if I filter for another status I expect the card to show null.

 

It does not matter what Workflow Status I filter for, but the number of record in "Review" stays the same.

 

I have moved the table over to a new PBI file and this is still occuring, there are no other relationships as it is just the 1 table in this new file.

 

mickey_1-1641790712503.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , If the filter is from same table 

then try like

calculate(countdistinct(Query1[record Number]), Filter(Query1, Query1[WorkFlow Status] = "Review" ))

 

if you want from a table that is not joined

 

calculate(countdistinct(Query1[record Number]), Filter(Query1, Query1[WorkFlow Status] in allselected(Query2[Workflow Status])))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , If the filter is from same table 

then try like

calculate(countdistinct(Query1[record Number]), Filter(Query1, Query1[WorkFlow Status] = "Review" ))

 

if you want from a table that is not joined

 

calculate(countdistinct(Query1[record Number]), Filter(Query1, Query1[WorkFlow Status] in allselected(Query2[Workflow Status])))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak

 

The top formula works 🙂

Thought just out of curiosity, do you know why my formula was not working?

I have checked and used it in other datsets, so I'm not sure what is different about the current dataset.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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