Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Best regards! Help! Help!
I have this case, each item has a budget and real sale per month, to calculate the adhesion I have to condition, if the budget is greater than the shipping, then the shipping counts, otherwise the budget.
I have the following code, but the total is incorrect, in the end a comparison of the result of the model vs calculated in excel.
Thanks in advance.
Solved! Go to Solution.
Hi @Syndicate_Admin ,
I created some data:
When the total is incorrect:
Here are the steps you can follow:
1. Create measure.
Total is correct =
var _table=SUMMARIZE('Table','Table'[Group],"_value",[Total is incorrect])
return
IF(HASONEVALUE('Table'[Month])&&HASONEVALUE('Table'[Group]),[Total is incorrect],SUMX(_table,[_value]))
2. Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Syndicate_Admin ,
I created some data:
When the total is incorrect:
Here are the steps you can follow:
1. Create measure.
Total is correct =
var _table=SUMMARIZE('Table','Table'[Group],"_value",[Total is incorrect])
return
IF(HASONEVALUE('Table'[Month])&&HASONEVALUE('Table'[Group]),[Total is incorrect],SUMX(_table,[_value]))
2. Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Syndicate_Admin , You need a measure like this. Use all columns in visual
Sumx(summarize(Table, Table[Month], Table[Second Column], "_1", [Countable]), [_1])
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 20 | |
| 20 | |
| 12 |
| User | Count |
|---|---|
| 66 | |
| 55 | |
| 42 | |
| 38 | |
| 30 |