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.
I'm trying to write what I thought would be a simple expression but I'm stumped ...
I want to write an expression that returns one measure for stores in states specified and another measure for stores in states not specified. For example, IF([State]="FL" or "GA" or "AL" or "LA", [Measure 1], [Measure2])
When I write the IF statement in a new measure, it appears that I can only evaluate measures and not dimensions like [State]. The other issue is how do I evaluate if the state column contains any of the states specified rather than just one state.
Solved! Go to Solution.
@Mainer04401 , Try like
IF([State] in{"FL", "GA", "AL" ,"LA"}, [Measure 1], [Measure2])
if you need more help make me @
Appreciate your Kudos.
@Mainer04401 , Try like
IF([State] in{"FL", "GA", "AL" ,"LA"}, [Measure 1], [Measure2])
if you need more help make me @
Appreciate your Kudos.
@amitchandakThank you but after I write If( the only fields I can enter are measures. None of my columns (dimensions such as state) are showing up. Do I need to write this expression in a column instead of a measure?
one of two
IF(firstnonblank([State],blank()) in{"FL", "GA", "AL" ,"LA"}, [Measure 1], [Measure2])
IF(max([State]) in{"FL", "GA", "AL" ,"LA"}, [Measure 1], [Measure2])
Covering 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 |
---|---|
110 | |
97 | |
78 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |