March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have this example data set and want to be able to create a table which has the combinations of all the different columns
Col1 | Col2 | Col3 | Col4 |
True | True | True | |
True | True | True | |
True | True | True | True |
True | |||
True | True | True | |
True | True |
The required output would be:
Combinations | Count |
Col1, Col2, Col3 | 1 |
Col2, Col3, Col4 | 2 |
Col1, Col2, Col3, Col4 | 1 |
Col1 | 1 |
Col2, Col3 | 1 |
Is there a way I can do this using PowerBI?
Solved! Go to Solution.
Hi @Anonymous ,
In addition to Greg_Deckler 's reply, after you do some transformation in Power Query Editor. I think your table will look like as below.
Then you can create calculated columns to achieve your goal.
Combinations =
CONCATENATEX (
FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) ),
'Table'[Attribute],
","
)
Create a table visual by [Combinations] column and distinct count index column.
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
In addition to Greg_Deckler 's reply, after you do some transformation in Power Query Editor. I think your table will look like as below.
Then you can create calculated columns to achieve your goal.
Combinations =
CONCATENATEX (
FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) ),
'Table'[Attribute],
","
)
Create a table visual by [Combinations] column and distinct count index column.
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is perfect thank you. Is there a way of having a combination of "Empty", if there is no value for Col1, Col2, Col3 or Col4?
@Anonymous Probably best to add an Index in Power Query Editor and then unpivot your 4 columns. Then this is a much easier solve I think.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |