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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vika160
Helper III
Helper III

Filter does not work in a measure

HI there,

 

It maybe a silly question, please, forgive me,  but I think it is crazy.

I have a table with column that has "IN" and "OUT" only value.

I need 2 very simple measures.

 

 Exams IN = CALCULATE(count(V_PBI_EXM_DATA1[ID]), V_PBI_EXM_DATA1[ExamProvider]="IN")
_Exams OUT = CALCULATE(count(V_PBI_EXM_DATA1[ID]), V_PBI_EXM_DATA1[ExamProvider]="OUT")

 

First measure works and return a correct value, second measure returns BLANK.

I  also tried this ways and it is the same BLANK value return: 

   Exams OUT = CALCULATE(count(V_PBI_EXM_DATA1[ID]), V_PBI_EXM_DATA1[ExamProvider] <>"IN")

_Exams OUT = CALCULATE(count(V_PBI_EXM_DATA1[ID]), FILTER(V_PBI_EXM_DATA1, V_PBI_EXM_DATA1[ExamProvider]= "OUT" ))

_Exams OUT = CALCULATE(count(V_PBI_EXM_DATA1[ID]), FILTER(V_PBI_EXM_DATA1, V_PBI_EXM_DATA1[ExamProvider]<> "IN" ))

 

Note:

there are no empty or null values in [ExamProvider] field, onlu IN and OUT

 In Power BI in  table  view mode I can see both values.

 

Any idea?

Thanks a lot!

 

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

powerbi/dax can be strange (but it will follow logic).  You might have seen the "auto-exist" problem but I would have to see the original pbix to know for sure. 

View solution in original post

5 REPLIES 5
vika160
Helper III
Helper III

I deleted the table form PBI and relinked it again. it is working now. So strange. 
Thank you for your help!

HotChilli
Super User
Super User

powerbi/dax can be strange (but it will follow logic).  You might have seen the "auto-exist" problem but I would have to see the original pbix to know for sure. 

I have a lot of data there that I cannot share. That is why I was trying to create new pbix with 2 tables only and stripped fields.  Is there a way to guide me where amd what  to look for?

 

vika160
Helper III
Helper III

Hi @HotChilli,

 

I created new pbix and did a table copy with few columns only. imported Calendar table.

Both measures seems work properly.

 

If I link 2 filtered tables to my original  pbix - one for IN and another for OUT -- measures work as well.

 I am wondering if there is something in a table I have to look for? 

 still it is strange but you never know.

 

Thank you

HotChilli
Super User
Super User

Can you provide the pbix please and I'll have a look

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.