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 Friends,
I need to create a new table for %100 stack bar chart. Column type will be new column, other columns will be from measures in other tables.
So, the bar chart will have two bars with same height/length. How can I do it? Any hint is very much appreciate it.
table would like this:
Type | Invoice | Interest | Payment | Discount | Balance |
Charge | 10000 | 100 | |||
Payment | 9800 | 100 | 200 |
Hi @River
You could refer to this blog DAX Measure in the Axis of the Power BI Report - RADACAD. It should be helpful. You just need to add a new table with only "Type" column. Then create a measure with SWITCH function to calculate different measures depending on different Type value. Put this measure into bar chart as Values field. Give it a try!
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
@River , In a calculated column, you can not add measures. The measure will not follow any filter and will have statics value
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Thanks for reply. This is all because of we need to use 100% stack bar chart, basically matching two bars for 'Charge' and 'Payment'. so we need to build a table I showed.
All columns like 'invoice', 'interest', 'Payment', 'discount', 'balance' are measures from other tables, then I add a 'Type' column (hard code) in order to make two bars.
Is there any alternative for this? Sorry I can't give an sample since those measures involved quite a few tables and relations between.
Many thanks,
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |