Forum Discussion
Sub Groups and All Together
I'm new to Power BI.
I have survey results for multiple locations. I can easily create a chart showing the % positive results for all locations in 1 chart. For example, location A, location B, and location C results are 3 side by side columns in 1 bar graph. I can also have a bar graph that summarizes the results for all locations into 1 master column.
What I'm looking for is to be able to have 1 graph with 4 columns - location A, location B, location C, and All (A,B,C together).
I want to show the % positive results for each location and directly compare it to the % postive results for all locations put together in a graph.
Is there any way to due that in a bar graph and not use a matrix?
Hi JodyMcKean ,
Create a table with all the locations plus an additional line with ALL something similar to this:
Now add the following measure:
Count of surveys = IF(SELECTEDVALUE('Locations'[Location])= "All", COUNTROWS('Surveys'), CALCULATE(COUNT('Surveys'[Answer]), 'Surveys'[Location] in VALUES('Locations'[Location])))Use the location from the new table in the axis:
3 Replies
- MFelixSuper User
Hi JodyMcKean ,
Create a table with all the locations plus an additional line with ALL something similar to this:
Now add the following measure:
Count of surveys = IF(SELECTEDVALUE('Locations'[Location])= "All", COUNTROWS('Surveys'), CALCULATE(COUNT('Surveys'[Answer]), 'Surveys'[Location] in VALUES('Locations'[Location])))Use the location from the new table in the axis:
- Ashish_MathurSuper User
Hi,
Share the structore of your raw dataset and show the expected result. Share data in a format that can be pasted in an MS Excel file.
- JodyMcKeanNew Member
This is perfect. I'm still lerning all the formula and measures. Thank you!