Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Everyone,
How can I get the same as the below image by using Power BI?
How can merge the cells like in as above image?
Thank you.
Solved! Go to Solution.
Assuming you have a fact table like the following:
Create dimension tables for mood and state including a sorting order column using:
Mood table =
SELECTCOLUMNS(
DISTINCT('Table'[Mood]), "dMood", 'Table'[Mood],
"Order",
SWITCH(TRUE(),
CONTAINSSTRING('Table'[Mood], "Very"), 1,
CONTAINSSTRING('Table'[Mood], "Neut"), 2,
3))
State table =
SELECTCOLUMNS(
DISTINCT(
'Table'[State]),
"dState", 'Table'[State],
"Order",
SWITCH(TRUE(),
CONTAINSSTRING('Table'[State], "I ag"), 1,
CONTAINSSTRING('Table'[State], "Strongly ag"), 2,
CONTAINSSTRINGEXACT('Table'[State], "Satisfied"), 3,
CONTAINSSTRINGEXACT('Table'[State], "Strongly satisfied"), 4,
CONTAINSSTRING('Table'[State], "More"), 5,
CONTAINSSTRING('Table'[State], "I dis"), 6,
CONTAINSSTRING('Table'[State], "Strongly dis"), 7,
CONTAINSSTRING('Table'[State], "Strongly uns"), 8,
10))
Sort the mood and state fields by the orders columns using this method:
Create one-to-many relationships between the dimension tables and the corresponding fields in the fact table. The model looks like this:
Create a matrix using the fields from the dimension table and the item field in the rows bucket. Expand all levels and under Row headers in the formatting pane turn off the +/- icons and turn off stepped layout under options
Sample PBIX file attached
Proud to be a Super User!
Paul on Linkedin.
Assuming you have a fact table like the following:
Create dimension tables for mood and state including a sorting order column using:
Mood table =
SELECTCOLUMNS(
DISTINCT('Table'[Mood]), "dMood", 'Table'[Mood],
"Order",
SWITCH(TRUE(),
CONTAINSSTRING('Table'[Mood], "Very"), 1,
CONTAINSSTRING('Table'[Mood], "Neut"), 2,
3))
State table =
SELECTCOLUMNS(
DISTINCT(
'Table'[State]),
"dState", 'Table'[State],
"Order",
SWITCH(TRUE(),
CONTAINSSTRING('Table'[State], "I ag"), 1,
CONTAINSSTRING('Table'[State], "Strongly ag"), 2,
CONTAINSSTRINGEXACT('Table'[State], "Satisfied"), 3,
CONTAINSSTRINGEXACT('Table'[State], "Strongly satisfied"), 4,
CONTAINSSTRING('Table'[State], "More"), 5,
CONTAINSSTRING('Table'[State], "I dis"), 6,
CONTAINSSTRING('Table'[State], "Strongly dis"), 7,
CONTAINSSTRING('Table'[State], "Strongly uns"), 8,
10))
Sort the mood and state fields by the orders columns using this method:
Create one-to-many relationships between the dimension tables and the corresponding fields in the fact table. The model looks like this:
Create a matrix using the fields from the dimension table and the item field in the rows bucket. Expand all levels and under Row headers in the formatting pane turn off the +/- icons and turn off stepped layout under options
Sample PBIX file attached
Proud to be a Super User!
Paul on Linkedin.
Hi @PaulDBrown
Is any chance to insert some emojis based on dmood column data?
Ex: Very Happy: 😀
Not Happy: 😔
Neutral: 🙂
Thank you.
Great.
Thank you for the solution.😄👌
just use a matrix visual and stack your columns
very happy will be your first column
agree disagree etc will be your second column
stack them on top of each other in the rows section
its helpful if you show a sample of your data.
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |