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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
E12345
Resolver II
Resolver II

Need to add "Percentage of Total" to the Chart after both "Row Total and "Column Total"

Hi!
I have a simple chart with a set of rows, a column and totals (crosstab). What I need is in addition to showing column and row totals, to also display a "Percentage of Total" row total as well as column total.  
The chart is based on the dataset that contain three columns: Ticket #Ticket Duration Band and Ticket Cost Band.
I am able to show the data as a crosstab chart, with "Ticket Cost Band" as Rows, "Ticket Duration band" as Columns, and Count of Tickets as Values, as shown on Picture 1. (pasted below).

Picture 1 - see cross tab on the right.

E12345_1-1698282961683.png       E12345_0-1698282914252.png

What I need is the extra data in the red box - perventage of total on either side, as shown on Picture 2.

Picture 2.


E12345_0-1698425064747.png

 

 

Below is the dataset I use to get the data into the grid. I wish I could attach the PBIX, but only "Super Users" have that capability. 
Feel free to copy and paste this dataset into Excel. THANK YOU!!!

 Ticket #  Ticket Duration Band  Ticket Cost Band 
3451.) Under 1 year1.) Under $100
4552.) 1 year - 3 years3.) $200 - $300
5651.) Under 1 year3.) $200 - $300
6661.) Under 1 year1.) Under $100
3352.) 1 year - 3 years2.) $100 - $200
6543.) 3 years - 6 years3.) $200 - $300
4562.) 1 year - 3 years1.) Under $100
9873.) 3 years - 6 years2.) $100 - $200
6671.) Under 1 year1.) Under $100
5641.) Under 1 year3.) $200 - $300
6461.) Under 1 year1.) Under $100
6543.) 3 years - 6 years2.) $100 - $200
9 REPLIES 9
nprasanthk
Frequent Visitor

Create additional measure like Count(ticketes) and drag it to chart then On top of Measue do like below.

nprasanthk_0-1700738453741.pngnprasanthk_1-1700738492681.png

 

It can be done, but I can only do that for one level summary (I am getting either percentages or totals - one or the other). But I need both - totals and percentages side by side. I think this might be achievable via tablix object on paginated reports, but not ia Power BI table.

 

To be clear - with your soltion I can either get the totals (marked in yellow) or percentages (marked in green). But I need both.

E12345_0-1701203562336.png

 



anilkapkoti
Helper II
Helper II

Hi @E12345 ,
Try This One

anilkapkoti_0-1698339978066.png

 



 

 IF (
    ISINSCOPE ( 'Table'[ Ticket Duration Band ] )
        && ISINSCOPE ( 'Table'[ Ticket Cost Band ] ),
    SUM ( 'Table'[ Ticket # ] ),
    FORMAT (
        SUM ( 'Table'[ Ticket # ] )
            / CALCULATE ( SUM ( 'Table'[ Ticket # ] ), ALL ( 'Table' ) ),
        "0.0%"
    )
)

 

 

I just took your idea of a chart with "Percenatges only", made two such charts, and underlatyed then under my original chart! ;D Then I took four blue shapes and sort of created a frame out of my three charts construction. 
It looks ugly, but can work as a tool tip if I format it better, lol.

 

The three arrows are pointing to three separate charts where the oriiginal chart with values only is at the center, while the percentage ones are framing the center chart from the bottom and from the right side where I only show their totals ;P. 

E12345_0-1698437157895.png

 

Thank you very much for your solution, I tried to use it but unfortunately it is not enough for my purposes. Even though it shows percentages as totals, I need to display both the totals and the percentages, as per my description. We already have this report built in crystal reports, and the users require the same "look". So I was hoping to do the same reprot in Power BI. 

After doing some research I found that the way to display both totals and percentage of totals in groups is via "tablix" object that is a part of paginated report. Currently there is no way to do it using any visual in Power BI Report. However, paginated report visual can be imbedded into Power BI and the tablix chart can be used from within report builder to create the display I need. I hope that in the future Power BI reports can do the same...

amitchandak
Super User
Super User

@E12345 , You can replace total with % of total using isinscope

How to Switch Subtotal and Grand Total in Power BI | Power BI Tutorials| isinscope: https://youtu.be/smhIPw3OkKA

 

But if you want an additional row, you need to modify dimensions or use an additional dim

 

Example with custom totals

Power BI How to get the P&L formatting right: https://youtu.be/C9K8uVfthUU
Power BI How to get two columns format Profit and Loss Statement(P&L) right: https://youtu.be/WLg85yiMgHI
https://medium.com/microsoft-power-bi/power-bi-formatted-p-l-with-custom-sub-totals-and-blank-rows-e...

Hi Amichandak,

I will look at your solution in a bit (swamped at work), But I was hoping to use some sort of dax function that can work with virtual tables and make it happen. I need the format that I described, and as a last resort I was going to just use a whole bunch of small cards (KPIs) in place of every cell, and get the data that way (but it is so much work!).
Also, we are working off a live connection, so I cannot do a lot of things that Power BI offers, such as create physical tables and columns (I have to ask dba who maintains the database to do that). 
Now sure what you mean by "But if you want an additional row, you need to modify dimensions or use an additional dim". I suppose it has something to do with new physical column creation, which I cannot do (it takes a long while to get those from the back end admins as well). So, I usually opt to rely on measures that I can make, and on Power BI Community ;). 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.