Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello
I have data in the format:
| ID | Country1 | Country2 |
| 1 | Y | |
| 2 | Y | |
| 3 | Y | Y |
| ID | Type |
| 1 | A |
| 2 | B |
| 3 | C |
How can I create a pivot visual that will show:
| Country1 | Country1 | Country2 | Country2 | |
| Y | (blank) | Y | (blank) | |
| Type | ||||
| A | ||||
| B | ||||
| C |
I would prefer to do so without merging the tables, just by specifying a data model relationship, is that possible?
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
How about create a new pivot table by using DAX:
New Pivot Table =
var _t1=SELECTCOLUMNS('Table',"ID",[ID],"Country Type","Country1","If Y",[Country1])
var _t2= SELECTCOLUMNS('Table',"ID",[ID],"Country Type","Country2","If Y",[Country2])
return UNION(_t1,_t2)
And then build relationship between it and the second table:
Then create a Matric visual:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
How about create a new pivot table by using DAX:
New Pivot Table =
var _t1=SELECTCOLUMNS('Table',"ID",[ID],"Country Type","Country1","If Y",[Country1])
var _t2= SELECTCOLUMNS('Table',"ID",[ID],"Country Type","Country2","If Y",[Country2])
return UNION(_t1,_t2)
And then build relationship between it and the second table:
Then create a Matric visual:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@amitchandak thanks but as I underline in bold letters, I have two separate tables and I do not want to merge them nor combine them in one table permanently but instead use data modelling to specify a relationship. Is there a solution for this?
Thanks!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 41 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 59 | |
| 31 | |
| 25 | |
| 25 |