Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I'm trying to recreate an Excel dashboard in Power BI. Part of what I need to do is create a table or matrix (not sure which is best) that shows premium by segment, which I've done. Now I want to create another column that calculates the % of total premium for each segment. The end result should look something like this.
| Segment | Inforce Premium | Premium Distribution |
| A | $7,000,000 | 54% |
| B | $4,000,000 | 31% |
| C | $2,000,000 | 15% |
| Total | $13,000,000 | 100% |
In Excel, I can do this by referencing the cell with the premium for each segment and dividing by the total premium, like this:
| Column | B | C | D |
| Row | Segment | Inforce Premium | Premium Distribution |
| 3 | A | 7000000 | =C3/$C$6 |
| 4 | B | 4000000 | =C4/$C$6 |
| 5 | C | 2000000 | =C5/$C$6 |
| 6 | Total | =SUM(C3:C5) | =C6/$C$6 |
My problem is I can't figure out how to reference the column total for premium. Does anyone know how I could do this % of total in Power BI?
Solved! Go to Solution.
So you are saying that you don't want slicer to filter out the total data? In that case, you need to create calculated field.
For that you need to create measure, let's say it is called Total Sales,
Total Sales = CALCUALTE(SUM(Sales[Revenue]), ALL(Sales))
% Revenue = SUM(Sales[Revenue])/[Total Sales]
This is an idea, if you need further help, let me know.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @pdemontigny,
You can achieve by creating a new calculated column with following formula,
Premium Dist = DIVIDE(Question[Enforce Premium],SUM(Question[Enforce Premium])).
Let me know, if you have any queries.
Thanks for your help. This works, however, I want to add a slicer that allows the user to filter for a specific state - meaning the Inforce Premium volumes would change. Do you know how I could set up the formula so that Premium Dist shows the % of total premium for whatever subset of data the user has filtered for?
So you are saying that you don't want slicer to filter out the total data? In that case, you need to create calculated field.
For that you need to create measure, let's say it is called Total Sales,
Total Sales = CALCUALTE(SUM(Sales[Revenue]), ALL(Sales))
% Revenue = SUM(Sales[Revenue])/[Total Sales]
This is an idea, if you need further help, let me know.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
There is inbuild feature in PowerBI to calculate the % of Grand Total.
Here is the link to more information https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-may-update-feature-summary/
Take a look at Analytic section
I hope it is helpful.
Thanks,
P
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |