Forum Discussion
Bar chart does not fill up all available space
- 6 years ago
Hi mmossel , there is another way to achieve a bar chart like below. Is this what you like?
First create measures like below:
M SfB Usage % = SUM(Sheet1[SfB Usage %]) M Yammer Usage % = SUM(Sheet1[Yammer Usage %]) M SPO Usage % = SUM(Sheet1[SPO Usage %])… And so on
Second, create a measure list table and enter names in it:
Then, use SWITCH function to create a master measure to be used as value in the chart.
Usage % = SWITCH(SELECTEDVALUE('MeasureList'[Order]),1,[M SfB Usage %],2,[M Yammer Usage %],3,[M SPO Usage %],4,[M Exo Usage %],5,[M ProPlus Usage %],6,[M Teams Usage %],7,[M EMS total usage %],8,[M AAD %],9,[M Win 10 Usage %])Finally, put the master measure in the bar chart as value and measure name as axis, then you will get the bar chart.
You can also change the color for each bar as you like. For more detailed guidance, please refer to this link https://radacad.com/dax-measure-in-the-axis-of-the-power-bi-report
Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.
Hi mmossel ,
Yes now I understand the issue.
Is it possible for you to share the pbix file as I am not able to reproduce the exact chart at my end?
Thanks,
Pragati
Sure, that's so nice of you! How can I best share the file with you? My organization does not allow to share a link to my cloud storage. Can you maybe share your email address in a private message?
- Pragati116 years ago
Super User
Hi mmossel ,
You can create a dropbox link for your pbix file or message me privately or create a WeTransfer link.
Do make sure to remove any sensitive information from your pbix file.
Thanks,
Pragati
- mmossel6 years ago
Microsoft Employee
Can't send any more private messages it seems, so here it is! Thank you again!
- Pragati116 years ago
Super User
Hi mmossel ,
The reason why you see a lot of white space in your chart is you haven't got anything under AXIS section. You have jut got measures in your VALUES section. See below:
Therefor a lot of space is shown. Try to move some kind of categorical column to the AXIS section, the white-space will go.
Something like this:
Thanks,
Pragati