Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
119 | |
83 | |
47 | |
42 | |
34 |
User | Count |
---|---|
190 | |
79 | |
72 | |
49 | |
46 |