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
IF
Post Prodigy
Post Prodigy

Exception for sub-total

Hi,
I want to re-do a table that was done in excel. I have the following data:

XXYYABCDEFGIJMPRPPRR
353532M236234675546922119%5%
353533M23321252552481496%4%
353536M251334675546922119%4%
353537M26343252652481596%3%
353551M257464675546922119%4%
353552M25566252552481495%4%
353553M244554675546322119%5%
353555M35258252552481494%3%
353601M2415946955469241110%5%
353602M25135292852412198%4%
353604M264534675946922158%6%
353607M231382525824214126%5%
353801M2223246755469221110%5%
353802M23039252552491496%4%
353803M2294596755663241110%5%
353804M22876252552481496%4%
353805M2258966755469221110%5%

 

 

Based on this data, I would like to display similar table as it is show below. This  table should be done for each XX value. I only provided an example for the first one.

 

XXYYABCPPRR
353532M2362349%5%
353533M2332126%4%
353536M2513349%4%
353537M2634326%3%
   34 3% 
Total(N) 983861226%16%
Total(%)  8.7%14.0%2.2%60.7%

 

For Column B, I must subtract total of M value for each XX column(category). For example; The M values for 35353 is 9+8+9+8=34. Only for B column the logic should be 23+21+33+43-34=86. PP column also should have similar logic with percentage. 3% is coming from 34/983.

 

I used matrix. I can have subtotals but not the sub-total percentage and subtotal(N) together. Can anyone help me for this issue...

 

All the best,

 

3 REPLIES 3
amitchandak
Super User
Super User

@IF , not very clear

But it would be like

New B = Sum(Table[B])- Sum(Table[M])

% = Divide([New B], Sum(Table[B])) , what is denominator for % ?

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

Hi,

Thanks for the answer. Sorry for being unclear. Based on the data, I want to have the following table:

  ABCPPRR
353532M2362349%5%
353533M2332126%4%
353536M2513349%4%
353537M2634326%3%
   34 3% 
Total(N) 983861226%16%
Total(%)  8.7%1.2%  

 

8.7% is 86/983  (SUM(B)-SUM(M))/SUM(A) However, I don't know how to show it in a table or in a similar format that I provided. This should be series for all XX values. Actually a matrix or a table is fine as well. Also as you see in Total(N), some of the totals are exclusion of SUM(M) and some of them don't include. When I have a table or matrix, it gives total with the same logic for all columns, I belive. At least, I don't know.

All the best

@IF , I doubt you can create a table which shows %total below total. The best you can do is change total by using is filtered or is in scope or has one value.

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

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.