The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I am working with survey data in powerBI (apologies, cannot share client data), and have a multiselect question. Respondents are asked about how often the partake in different activities. I have the data unpivoted so one colum is the respondent ID, one is the activity they were asked about and the last is their response:
I can then use this to make a clustered bar chart using a measure, with each cluster being the activity asked about:
However, the percentages arent quite right, and im struggling to get them to work, they either seem to be half what they should be, or add to more than 100% for each activity. I adapted a measure that was suggested here https://community.powerbi.com/t5/Desktop/Calculating-Percentage-of-total-column-for-bar-chart/td-p/1... so now have
Hi @Anonymous ,
I think you should use COUNT function to calculate the number of uuid per Dine out per response.
Dine out Measure =
DIVIDE (
COUNT ( 'Dine Out'[uuid] ),
CALCULATE ( COUNT ( 'Dine Out'[uuid] ), ALLEXCEPT ( 'Dine Out', 'Dine Out'[Response] ))
)
Best regards,
Yuliana Gu
Hi @v-yulgu-msft,
Thanks for the responses, I actually started with that code and ran into the same problems. The general proportions are right but the actual percents are incorrect and add up to less than 100%. Do you potentially know of any other ways?
Thanks!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
94 | |
88 | |
71 | |
65 |
User | Count |
---|---|
241 | |
124 | |
120 | |
81 | |
79 |