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.
Hi Everyone,
I need to filter data on 2 conditions. Can anyone help me out?
error: A function 'FILTER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
Accessory Tiers =
Var _tier1 = CALCULATE(SUM(TierGoals[TIER 0 - MAX]),FILTER(TierGoals,TierGoals[JOB FUNCTION]="RSM") && FILTER(TierGoals,TierGoals[ITEM]="Accessory Goal"))
Var _tier2 = CALCULATE(SUM(TierGoals[TIER 1 - MAX]),FILTER(TierGoals,TierGoals[JOB FUNCTION]="RSM") && FILTER(TierGoals,TierGoals[ITEM]="Accessory Goal"))
Var _tier3 = CALCULATE(SUM(TierGoals[TIER 2 - MAX]),FILTER(TierGoals,TierGoals[JOB FUNCTION]="RSM") && FILTER(TierGoals,TierGoals[ITEM]="Accessory Goal"))
Var _tier4 = CALCULATE(SUM(TierGoals[TIER 3 - MAX]),FILTER(TierGoals,TierGoals[JOB FUNCTION]="RSM") && FILTER(TierGoals,TierGoals[ITEM]="Accessory Goal"))
Var _tier5 = CALCULATE(SUM(TierGoals[TIER 4 - MAX]),FILTER(TierGoals,TierGoals[JOB FUNCTION]="RSM") && FILTER(TierGoals,TierGoals[ITEM]="Accessory Goal"))
Var _ActualGoal = [Accessory % TO GOAL]
Return
IF(_ActualGoal>=_tier1,_tier1,IF(_ActualGoal>=_tier2,_tier2,IF(_ActualGoal>=_tier3,_tier3,IF(_ActualGoal>=_tier4,_tier4,0))))
Solved! Go to Solution.
Try this syntax for your two conditions. You don't need two FILTER statements:
CALCULATE(
SUM( TierGoals[TIER 0 - MAX] ),
FILTER(
TierGoals,
TierGoals[JOB FUNCTION] = "RSM"
&& TierGoals[ITEM] = "Accessory Goal"
)
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingTry this syntax for your two conditions. You don't need two FILTER statements:
CALCULATE(
SUM( TierGoals[TIER 0 - MAX] ),
FILTER(
TierGoals,
TierGoals[JOB FUNCTION] = "RSM"
&& TierGoals[ITEM] = "Accessory Goal"
)
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |