Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys,
I need your help on this. I have a list of possible results. I want a combination of them.
To be more specific , please check the table below.
And lets take an example.
For each match, i want all the combinations (as a list) between all players (i need exact one line per player ) but just with one success for each one.
Let me make it more clear for you. Lets check match 2 as is easier for me to populate all combo
The combinations would be:
So i want only one success line but for all players per game ( game A - Players ( A,B,C,D,E)) and i need all those combination of success.
Any ideas?
Thanks in advance
Solved! Go to Solution.
Hi @Anonymous ,
Is that you want a table that contains the Cartesian product of all rows?
Please consider use CROSSJOIN().Perhaps you can follow the steps below.
In the first step, get the unique value of each column, using values().
In the second part, combine these unique values. Use crossjoin()
Please modify the following MEASURE according to your dataset.
measure =
VAR _name =
VALUES ( 'table'[name] )
VAR _player =
VALUES ( 'table'[player] )
VAR _field =
VALUES ( 'table'[field] )
VAR _values =
VALUES ( 'table'[values] )
RETURN
CROSSJOIN ( _name, _player, _field, _values )
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Not very clear
A new table like ?
crossjoin(distinct(Table[Player]), distinct(table[Match]), distinct(Table[Field]) )
ok i will try to make it easier
I want all combo with one acceptable value per case.
For the example above :
A_1, B_A, C_2
A_2, B_A, C_2
A_1, B_A, C_5
A_2, B_A, C_5
A_1, B_A, C_8
A_2, B_A, C_8.
All the possible values per key in my dataset are presented as a line as the screenshot below :
I have to find a way to populate all the possible combinations (per match) in one list
Better?
Hi @Anonymous ,
Is that you want a table that contains the Cartesian product of all rows?
Please consider use CROSSJOIN().Perhaps you can follow the steps below.
In the first step, get the unique value of each column, using values().
In the second part, combine these unique values. Use crossjoin()
Please modify the following MEASURE according to your dataset.
measure =
VAR _name =
VALUES ( 'table'[name] )
VAR _player =
VALUES ( 'table'[player] )
VAR _field =
VALUES ( 'table'[field] )
VAR _values =
VALUES ( 'table'[values] )
RETURN
CROSSJOIN ( _name, _player, _field, _values )
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
98 | |
80 | |
75 | |
66 |
User | Count |
---|---|
136 | |
109 | |
104 | |
82 | |
73 |