Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
How can I display the percentage of total next to the settlement? One column is text and the other column is GBP £.
Kind regards
Dom
Solved! Go to Solution.
Hi @Anonymous
If Settlement is an explicit measure you can use a DAX expression like this:
% Settlement =
VAR SettlementVal = [Settlement]
VAR AllSettlement =
CALCULATE (
[Settlement],
ALL ( Table1[Channel] )
)
VAR Result = DIVIDE ( SettlementVal, AllSettlement )
RETURN Result
If you've simply dropped the Settlement column from your data model and allowed Power BI to aggregate the result (i.e. an implicit measure), then simply add the column to the table again, right click it in the 'Values' field well and select Show value as>>Percent of grant total.
Best regards,
Martyn
If I answered your question, please help others by accepting it as a solution.
Hi @Anonymous
If Settlement is an explicit measure you can use a DAX expression like this:
% Settlement =
VAR SettlementVal = [Settlement]
VAR AllSettlement =
CALCULATE (
[Settlement],
ALL ( Table1[Channel] )
)
VAR Result = DIVIDE ( SettlementVal, AllSettlement )
RETURN Result
If you've simply dropped the Settlement column from your data model and allowed Power BI to aggregate the result (i.e. an implicit measure), then simply add the column to the table again, right click it in the 'Values' field well and select Show value as>>Percent of grant total.
Best regards,
Martyn
If I answered your question, please help others by accepting it as a solution.
Even though it looks like Power BI is adding up a column of numbers here, that is not what is really happening. Power BI calculates each cell individually, based on its filter context.
That means that to get the total amount you need to calculate the percent of total you will have to use a CALCULATE() statement and include the ALL() function. ALL removes the filters that the graphic is generating( to show one line at a time )and restores all the rows in your table so you can total them.
Percent of Total =
VAR Total Amount = CALCULATE(SUM(yourTable[Settlement]),ALL(yourTable))
VAR Current Amount = SELECTEDVALUE(YourTable[Settlement])
VAR PercentOfTotal = DIVIDE([Current Amount],[Total Amount])
RETURN PercentOftotal
I'm a personal Power Bi Trainer I learn something every time I answer a question
The Golden Rules for Power BI
Help when you know. Ask when you don't!
Drag the same measure to values in the visual pane. Right click and check do you have the option "Show value AS". If yes click and choose % of Total
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |