Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, can someone help?
I need this DAX calculation, but the other way around:
@ https://community.powerbi.com/t5/Quick-Measures-Gallery/Transitive-Closure/td-p/783828
(Output > DAX > Input)
Thanks for your help!
@Anonymous maybe this is what you want
here is the code
Input = VAR t=
SELECTCOLUMNS (
GENERATE (
GENERATE (
ADDCOLUMNS (
Output,
"@path", SUBSTITUTE ( Output[Destinations], ";", "|" ),
"@n",
LEN ( Output[Destinations] )
- LEN ( SUBSTITUTE ( Output[Destinations], ";", "" ) ) + 1
),
GENERATESERIES ( 1, [@n], 1 )
),
ROW ( "To", PATHITEM ( [@path], [Value] ) )
),
"From", [From],
"To", [To]
)
RETURN
FILTER(t,VAR fr=[From] VAR tt=[To] RETURN COUNTROWS(FILTER(t,[From]=tt||[To]=fr)))
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |