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

if() based measure not filtering or slicing

I have a measure with 4 variables, the final product of which (FixedBooleanValue) is to return a true if 0, otherwise false.

All four variables before the return will filter by organisation correctly if turned into their own measures, and it is only the final measure that appears to disregard when filtered.

Relationships here are:

 

Agreement[AgreementKey] 1 - * Agreement Conditions[AgreementKey]

Calendar[DateKey] 1 - * 'Agreement Conditions'[DateKey]

Organisation[OrganisationKey 1 -* 'Agreement Conditions'[OrganisationKey]

 

The measure is:

Discount Fixed Boolean:= 
var Margin = calculate(
    average('Agreement Conditions'[Discount Margin Pct])
    ,lastnonblank('Calendar'[ActualDate],average('Agreement Conditions'[Discount Margin Pct]))
    )
var Minimum = calculate(
    average('Agreement Conditions'[Discount Minimum Pct])
    ,lastnonblank('Calendar'[ActualDate],average('Agreement Conditions'[Discount Minimum Pct]))
    )
var BaseRate = calculate(
    average('Agreement Conditions'[Discount Base Rate Pct])
    ,lastnonblank('Calendar'[ActualDate],average('Agreement Conditions'[Discount Base Rate Pct]))
    )
var FixedBooleanValue = Margin+Minimum+BaseRate
return
if(FixedBooleanValue = 0, true, false)

So for some reason filter contexts are not applied for the final if() and appears to behaving like something akin to a cross-join, as all agreement keys are appearing next to all organisations.

I would be grateful to be shown where I am going wrong.

0 REPLIES 0

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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