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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jpbi23
Helper I
Helper I

Power bi Sub Total wrong

here is my current table, I have one opportunity. The split % for the opportunity is getting divided per team member accordingly. Split NARR calculates the amount based on the split %. All is correct but the total for Split NARR. 

 

jpbi23_2-1701974612204.png

here is my current dax for Split NARR,

 

Split NARR = SUM('MASTER_PRODUCT'[NEW_PRODUCT_ARR_FX_ADJUSTED]) *
                       AVERAGE(MASTER_OPPORTUNITY_SPLIT[SPLIT_PERCENT])/100
 
How do I get the total for Splitt NARR correct? It should be 145,672.49
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @jpbi23 ,

 

Measure follows the context of the "Total" row and is calculated in that context. Therefore, using a measure in a column of a table visualization may have unexpected values in the "Total" column.

You can use the following measure, using the IF()+HASONEVALUE() function, to determine if it is Total, and if it is, you can calculate it according to your own needs, such as Average, Sum, etc.

 

You can try using the following measure.

Measure =
var _table=SUMMARIZE('Table','Table'[Opportunity ID],"Value",[Split NARR])
return
IF(
    HASONEVALUE('Table'[Opportunity ID]),[Split NARR],SUMX(_table,[Value]))

 

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

3 REPLIES 3
Anonymous
Not applicable

Hi  @jpbi23 ,

 

Measure follows the context of the "Total" row and is calculated in that context. Therefore, using a measure in a column of a table visualization may have unexpected values in the "Total" column.

You can use the following measure, using the IF()+HASONEVALUE() function, to determine if it is Total, and if it is, you can calculate it according to your own needs, such as Average, Sum, etc.

 

You can try using the following measure.

Measure =
var _table=SUMMARIZE('Table','Table'[Opportunity ID],"Value",[Split NARR])
return
IF(
    HASONEVALUE('Table'[Opportunity ID]),[Split NARR],SUMX(_table,[Value]))

 

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.

PijushRoy
Super User
Super User

Hi @jpbi23 

Please try below code

 

=if(
Hasonevalue('Table'[Oppourtunity ID]),
SUM('MASTER_PRODUCT'[NEW_PRODUCT_ARR_FX_ADJUSTED]) *
                       AVERAGE(MASTER_OPPORTUNITY_SPLIT[SPLIT_PERCENT])/100),
SUM('MASTER_PRODUCT'[NEW_PRODUCT_ARR_FX_ADJUSTED]))

 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





still doing the same thing, 

 

jpbi23_1-1701981707264.png

It's taking the sum of NEW_PRODUCT_ARR_FX_ADJUSTED and it's dividing by the Average of SPLIT_PERCENT. So 2,057,0821.49 / 50 = 1,028,910.75

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors