The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
hello team,
1. i have below sample data in csv which is used to create sankey chart in PowerBI
2. Now I want to create a new column to find the parent node for each target node. I want to use DAX PATH function to achieve this, but I got an error. " The value 'open_list_view_1' in 'test'[source] must also exist in 'test'[target]. Please add the missing data and try again."
Thanks,
Cherie
Hi, @Anonymous
Looking for the parent node, what is the output you expect? Based on the limitations of the PATH function, your source data format does not quite meet the requirements of the formula.
If you want to see if [target] appears in [source], you can try the following.
Column = IF([target] in VALUES('Table'[source]),1,0)
If this doesn't solve your problem, please let us know what you were expecting.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-zhangti,
Thanks for the reply. My goal is that I can filter the whole sankey chian when filtering by sankey and chart. Right now, the powerBI only returns the selected source node and its target node when applying source and target filter. So I am trying to find a workaround and I found this solution which says PATH and PATHCONTAINS DAX functions will help. https://community.powerbi.com/t5/Desktop/Filter-for-entire-quot-chain-quot-in-network-sankey-chart-n... . But when I tried, I meet the issue described in this ticket.
how can i achieve?
Thanks,
Cherie
@Anonymous , The parent value should be there on the child side
https://docs.microsoft.com/en-us/dax/path-function-dax#remarks
Hi @amitchandak ,
do you mean that switch the two paramters of PATH function. I tried with below, and still failed.
Column = PATH(test[source], test[target])
Thanks,
Cherie
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |