Forum Discussion
Anonymous
10 years agoNot applicable
Visualizing multiple true/false questions in ONE stacked chart
Hi everybody I'm new to Power BI and need some help visualizing multiple true/false questions in one chart as a percentage average of the sum sales prize. Here it goes: Sales opportunity, uni...
- 10 years ago
Anonymous
In this scenario, you can first transform your table in Query Editor and then you can get the expected result with one measure. Please refer to following steps.
- In Query Editor, duplicate Table1 and rename it to Table2.
- Delete the three columns (blue, 4WD and backseats) of Table1. Delete one column (Sales prize) of Table2.
- Multiple select the three columns (blue, 4WD and backseats) of Table2, click “Unpivot Columns”.
- Filter the rows which “Value” = True in Table2. Then delete the “Value” column.
- Select the “Attribute” column in Table2, click “Split Column by Delimiter” of Space at the right-most delimiter as below. Replace ? with null in “Attribute.2” column. Rename “Attribute.2” to “Type” and delete “Attribute.1” column.
- Close and apply Query Editor. A 1:* relationship between Table1 and Table2 will be created automatically. Create a measure with following formula. Set its Format to “Percentage”.
Percent = DIVIDE ( SUM ( Table1[Sales prize] ), CALCULATE ( SUM ( Table1[Sales prize] ), ALL ( Table2 ) ) ) - Drag Stacked bar chart into your canvas. Select Type for Axis, Percent for Value, Sales prize (Quick Calc Sum) for Tooltips.
- 10 years ago
Anonymous
After you update the data tables, you only need to click “Refresh All” in Query Editor.
Best Regards,
Herbert
v-haibl-msft
10 years agoMicrosoft Employee
Anonymous
After you update the data tables, you only need to click “Refresh All” in Query Editor.
Best Regards,
Herbert
Anonymous
10 years agoNot applicable