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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
toddrobertander
Frequent Visitor

Filters ignored when addition is in a measure

I'm trying to create a measure that calculates the number of patients who have not had a visit within a certain range of time and I came across behavior I don't understand where measures with addition ignore other filters, while other measures (including multiplication) work fine..

 

Two test measures:

TestAddition = max(patient[patient_id])+1

TestMultiplication = 1*max(patient[patient_id])

 

The result:

addition unfiltered.png

On the left, the filters are ignored for the addition case, while on the right, the filters are applied. 

 

Why is this happening and is there a common workaorund?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I suspect, without doing any testing cuz I'm lazy, is that you are seeing how Power BI maths up the handling around a BLANK().

 

BLANK() + 1 = 1

BLANK() * 1 = BLANK()

 

And rows with blank values get "filtered out"

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

I suspect, without doing any testing cuz I'm lazy, is that you are seeing how Power BI maths up the handling around a BLANK().

 

BLANK() + 1 = 1

BLANK() * 1 = BLANK()

 

And rows with blank values get "filtered out"

That makes so much sense. I think it explains everything. I'll have to test it against my more fundamental measure.

 

Thanks

Todd

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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