Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Is it possible to do a calculation instead of just a "Value" in the if true and if false?
For example: I would like to sum everything, but if it is group blue, you double those values.
So in the example below, I would want to get the number 49.
Basically if the group is blue, take sum of dollars that are group blue and multiply those by two, and if not, sum the rest, then get a total sum of it all.
Group Dollars
Blue 4
Green 4
Green 3
Blue 2
Red 5
Red 3
Blue 4
Green 1
Yellow 2
Green 3
Blue 4
yes sure
first create measure
Total dollars = SUM(Powerbi[Dollars])
then create your condition
New Total =
IF(
MAX(Powerbi[Group]) = "Blue" , [Total dollars] * 2 , [Total dollars])
however yo uwill get wrong total
so to fix it create a new measure
Correct Total =
IF(HASONEVALUE(Powerbi[Group]),[New Total],SUMX(VALUES(Powerbi[Group]),[New Total]))
Hi,
I recommend reading this article:
Introducing CALCULATE in DAX - SQLBI
For your example something like this should work:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 9 | |
| 8 |