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 everyone,
At the moment I have this bar chart, but I would like to create an additional column where I get all the responses in a stacked bar, aggregated by age. How would I go about doing this?
Thank you
Sara
Solved! Go to Solution.
@singarfield,
You can create a measure using similar DAX as below. Then use Line and stacked column chart to dispaly the data, or drag the measure to tooltips of your current bar chart.
Measure = CALCULATE([yourmeasure],ALLEXCEPT(Table,Table[Age]))
Regards,
Lydia
@singarfield,
Right-click your table, and select "New Measure", then apply above formula.
Regards,
Lydia
@singarfield,
You can create a measure using similar DAX as below. Then use Line and stacked column chart to dispaly the data, or drag the measure to tooltips of your current bar chart.
Measure = CALCULATE([yourmeasure],ALLEXCEPT(Table,Table[Age]))
Regards,
Lydia
Hi,
Im still very new to power BI, so this doesn't really tell me where I would go to create this value. Could you give more of a step-by-step answer, please?
Thank you
Sara
@singarfield,
Right-click your table, and select "New Measure", then apply above formula.
Regards,
Lydia
Thank you!
Sara
I don't think you have an option to add Grand Total in a bar chart. A workaround would be the following:
1. Create a new dimension table Age:
Age New = UNION (ROW("Age", "Total"), VALUES(Table[Age]))
2. Create a relationship between the Age column in this new dimension table and your fact table.
3. Create a new measure:
Measure New = SWITCH ( SELECTEDVALUE ( 'Age New'[Age] ), "Total", CALCULATE ( [Measure], ALL ('Age New'[Age]) ), [Measure] )
4. Use this Measure New and Age New dimension in your chart.
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |