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,
I am trying to put some data on the horizonta bar chart.
Here is the table I have:
Employee | Question 1 | Question 2 | Question 3 |
Employee 1 | Yes | No | No |
Employee 2 | No | Yes | No |
Employee 3 | Yes | Yes | |
Employee 4 | Yes | No | No |
Employee 5 | No | Yes | No |
Employee 6 | Yes | ||
Employee 7 | Yes | No | |
Employee 8 | Yes | No | |
Employee 9 | No | ||
Employee 10 | No |
I want to get a visual which will show 3 bar charts with % of Yes, No and Blank values as below:
One stacked ar chart for some reason the categories (Yes, No, Blank) are getting split to separated bars instead of showing % on one bar.
Thank you!
Solved! Go to Solution.
Hi @OrM ,
Refer the formula to create a new table.
Table 2 = UNION(SELECTCOLUMNS('Table',"employee",'Table'[Employee],"question","question1","status",IF('Table'[Question 1] in {"Yes","No"},'Table'[Question 1],"Blank")),
SELECTCOLUMNS('Table',"employee",'Table'[Employee],"question","question2","status",IF('Table'[Question 2] in {"Yes","No"},'Table'[Question 2],"Blank")),
SELECTCOLUMNS('Table',"employee",'Table'[Employee],"question","question3","status",IF('Table'[Question 3] in {"Yes","No"},'Table'[Question 3],"Blank")))
Then put question in Axis, status in Legebd and count of employee in Values.
Best Regards,
Jay
Hi @OrM ,
Refer the formula to create a new table.
Table 2 = UNION(SELECTCOLUMNS('Table',"employee",'Table'[Employee],"question","question1","status",IF('Table'[Question 1] in {"Yes","No"},'Table'[Question 1],"Blank")),
SELECTCOLUMNS('Table',"employee",'Table'[Employee],"question","question2","status",IF('Table'[Question 2] in {"Yes","No"},'Table'[Question 2],"Blank")),
SELECTCOLUMNS('Table',"employee",'Table'[Employee],"question","question3","status",IF('Table'[Question 3] in {"Yes","No"},'Table'[Question 3],"Blank")))
Then put question in Axis, status in Legebd and count of employee in Values.
Best Regards,
Jay
@OrM , replace blank with value blank in power query. blank as text blank
the unpivot the Questions, you will question column
Now create a stacked visual Question on axis, Answer(yes, no and blank) on legend, employee count as value
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |