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 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!
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 |
---|---|
108 | |
105 | |
87 | |
74 | |
66 |
User | Count |
---|---|
124 | |
112 | |
96 | |
82 | |
72 |