Forum Discussion
CROSSJOIN by group
- Anonymous6 years ago
// Assumption: // No relationship between the tables. GENERATE( 'Table A', var __stop = 'Table A'[Stop] return SELECTCOLUMNS( CALCULATETABLE( VALUES( 'Table B'[Stations] ), 'Table B'[Stop] = __stop ), "B Stations", 'Table B'[Stations] ) )
Hello Anonymous,
Please follow the link below:
https://community.powerbi.com/t5/Desktop/Help-a-noobie-column-combination/m-p/946976#M453788
I am hopeful this is what you are looking for.
Cheers!
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂
https://www.vivran.in/
Connect on LinkedIn
Thank you for your answer, vivran22
Unfortunately, this seems also to produce a full CROSSJOIN.
I'd need a CROSSJOIN grouped by column "Stations" (as shown in the example result table).
This should be possible with DAX, doesn't seem to hard! I just can't get my head around it.
- Anonymous6 years agoNot applicableUse lookupvalue function.
Thanks
Pravin - Anonymous6 years agoNot applicableThis should be dead easy with GENERATE or GENERATEX.
Best
D- Anonymous6 years agoNot applicable
// Assumption: // No relationship between the tables. GENERATE( 'Table A', var __stop = 'Table A'[Stop] return SELECTCOLUMNS( CALCULATETABLE( VALUES( 'Table B'[Stations] ), 'Table B'[Stop] = __stop ), "B Stations", 'Table B'[Stations] ) )- Anonymous6 years agoNot applicable
thank you so muchAnonymous !
this seems to produce the table I was looking for! I don't think I would have come up with that solution, so "dead simple" maybe for you 😆thank you community!