Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Incorrect total

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.

Countable = SUMX(VALUES('Style by Make'[Assembly Style]),

Where _Budget = Calculations[Budget]
Where _Shipping = Calculations[Shipping]

Return
IF(_Budget>_Shipping,_Shipping,_Budget))

MHR88_0-1653314382586.png

Thanks in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Syndicate_Admin ,

I created some data:

vyangliumsft_0-1653551518529.png

When the total is incorrect:

vyangliumsft_1-1653551518530.png

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:

vyangliumsft_2-1653551518531.png

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @Syndicate_Admin ,

I created some data:

vyangliumsft_0-1653551518529.png

When the total is incorrect:

vyangliumsft_1-1653551518530.png

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:

vyangliumsft_2-1653551518531.png

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

amitchandak
Super User
Super User

@Syndicate_Admin , You need a measure like this. Use all columns in visual

 

Sumx(summarize(Table, Table[Month], Table[Second Column], "_1", [Countable]), [_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.