Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi, I have a requirement which I am not able to solve.
The requirement is.
From the above table, Calculating the "% of Revenue" is percentage of sum of revenue to the grand total Revenue.
measure "Margin Bracket" tells in which bucket does "% of Revenue" falls into.
I have to use "Margin Bracket" measue in X-axis, I will be using it for Clustered Column Chart and Matrix.
I have added the link of the sample pbi file. Please help.
https://drive.google.com/file/d/1FamafchyS7EesRNazhbzGHjaGBRIsg6e/view?usp=drive_link
Solved! Go to Solution.
Hi, @sam_gift
You can try the following methods.
New table = SUMMARIZE(Sheet1,Sheet1[Product],"Sum",SUM(Sheet1[Revenue]))
Column:
% = DIVIDE([Sum],SUMX(ALL('New table'),[Sum]))
New Margin Bracket = SWITCH(TRUE(),
[%]<0,"< 0%",
[%]<0.15,"0 - 15%",
[%]<0.30,"15 - 30%",
[%]<0.45,"30 - 45%",
[%]<0.60,"45 - 60%",
[%]>0.60,"> 60%"
)
The "New Margin Bracket" can be used as the X-axis.
Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @sam_gift
You can try the following methods.
New table = SUMMARIZE(Sheet1,Sheet1[Product],"Sum",SUM(Sheet1[Revenue]))
Column:
% = DIVIDE([Sum],SUMX(ALL('New table'),[Sum]))
New Margin Bracket = SWITCH(TRUE(),
[%]<0,"< 0%",
[%]<0.15,"0 - 15%",
[%]<0.30,"15 - 30%",
[%]<0.45,"30 - 45%",
[%]<0.60,"45 - 60%",
[%]>0.60,"> 60%"
)
The "New Margin Bracket" can be used as the X-axis.
Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Create a Measure for "% of Revenue": In Power BI, you can create a new measure to calculate the "% of Revenue." The formula might look something like this:
% of Revenue = SUM('YourTable'[Revenue]) / CALCULATE(SUM('YourTable'[Revenue]), ALL('YourTable'))
Replace 'YourTable' with the actual name of your table.
Create a Measure for "Margin Bracket": Since you already have a measure for "Margin Bracket," ensure it is correctly calculated based on the "% of Revenue." The formula might look like:
Margin Bracket =
SWITCH(
TRUE(),
[YourPercentageMeasure] >= 0 && [YourPercentageMeasure] < 0.2, "Bracket 1",
[YourPercentageMeasure] >= 0.2 && [YourPercentageMeasure] < 0.4, "Bracket 2",
-- Add more conditions as per your requirements
"Other"
)
Replace [YourPercentageMeasure] with the actual name of your "% of Revenue" measure.
Use "Margin Bracket" in Visualizations:
For Clustered Column Chart: Place "Margin Bracket" in the X-axis field well, and use other measures (like Revenue or % of Revenue) for the values.
For Matrix: Add "Margin Bracket" to the Rows or Columns field, and use other measures as needed.
Without the specific details or the sample file, I hope this general guidance helps you set up your visualizations in Power BI. If you encounter any issues or need further assistance, please provide more details or share the sample file for a more accurate solution.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |