This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi,
I have a table of multiple columns that I will like to display showing all possible combinations of those values. Does anyone has an easy solution? Below a simple example of what I am trying to resolve. Thank you.
Solved! Go to Solution.
Hi @Aleph18
Create a new table, where Table1 is the original table you show on the left:
NewTable =
VAR AuxTable_ =
CROSSJOIN ( DISTINCT ( Table1[Product] ); DISTINCT ( Table1[Type] ) )
RETURN
ADDCOLUMNS (
AuxTable_;
"Quantity"; LOOKUPVALUE (
Table1[Quantity];
Table1[Product]; [Product];
Table1[Type]; [Type]
)
)
You can use this DAX, though I always prefer to do this type of thing in Power Query:
Table 2 =
ADDCOLUMNS(
CROSSJOIN(
SELECTCOLUMNS('Table', "Type",'Table'[Type]),
SELECTCOLUMNS('Table',"Product",'Table'[Product]
)
),
"Quantity", CALCULATE( SUM( 'Table'[Qty])))
You can use this DAX, though I always prefer to do this type of thing in Power Query:
Table 2 =
ADDCOLUMNS(
CROSSJOIN(
SELECTCOLUMNS('Table', "Type",'Table'[Type]),
SELECTCOLUMNS('Table',"Product",'Table'[Product]
)
),
"Quantity", CALCULATE( SUM( 'Table'[Qty])))
Hi @Aleph18
Create a new table, where Table1 is the original table you show on the left:
NewTable =
VAR AuxTable_ =
CROSSJOIN ( DISTINCT ( Table1[Product] ); DISTINCT ( Table1[Type] ) )
RETURN
ADDCOLUMNS (
AuxTable_;
"Quantity"; LOOKUPVALUE (
Table1[Quantity];
Table1[Product]; [Product];
Table1[Type]; [Type]
)
)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 27 | |
| 26 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 36 | |
| 32 | |
| 26 | |
| 23 |