Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All - I'm new to PowerBI and the community and could really use some help with a DAX IF statement which I am stuck on.
I have a simple table with two columns (SiteId and Att Rate) and wish to create a new measure. I want this measure to say:
'If SiteId equals 28 or 52, then return "0.1%", else return Att Rate"
I have tried this in DAX: IF((SUM(Table[SiteId])=28 || SUM(Table[SiteId])=52),"0.1%",[Att Rate])
This returns the correct result of 0.1% for Site 28, however for Site 52 - the normal Att Rate is returned, instead of the desired result of 0.1%.
Can anyone see what the problem is here? I must have made an oversight somewhere but cannot see where!
Any help would be greatly appreciated. Thanks!
Solved! Go to Solution.
Thank you everyone for your insight. Your solutions are all much appreciated, however replacing SUM with MAX using my original DAX gave me the required solution.
Does this have to be a Measure? Here's the logic with a New Column instead?
Proud to give back to the community!
Thank You!
P.S. Measure version if needed...
Proud to give back to the community!
Thank You!
User | Count |
---|---|
98 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
58 |