Forum Discussion
Sankey Chart Data model Preparation
- Anonymous2 years ago
Thanks for the reply from lbendlin , please allow me to provide another insight:
Hi snehasissamal ,
Here are the steps you can follow:
1. Create calculated table.
True Table= var _table1= SUMMARIZE('Table',[Sector],[Directorate],"Budget", SUMX(FILTER(ALL('Table'),[Sector]=EARLIER('Table'[Sector])&&[Directorate]=EARLIER('Table'[Directorate])),[Estimated Budget]), "Level","1") var _table2= SUMMARIZE( 'Table',[Directorate],'Table'[Expenditure Type],"Budget", SUMX( FILTER(ALL('Table'), [Directorate]=EARLIER('Table'[Directorate])&& [Expenditure Type]=EARLIER('Table'[Expenditure Type])),[Estimated Budget]), "Level","2") return UNION( _table1,_table2)2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for the reply from lbendlin , please allow me to provide another insight:
Hi snehasissamal ,
Here are the steps you can follow:
1. Create calculated table.
True Table=
var _table1=
SUMMARIZE('Table',[Sector],[Directorate],"Budget",
SUMX(FILTER(ALL('Table'),[Sector]=EARLIER('Table'[Sector])&&[Directorate]=EARLIER('Table'[Directorate])),[Estimated Budget]),
"Level","1")
var _table2=
SUMMARIZE(
'Table',[Directorate],'Table'[Expenditure Type],"Budget",
SUMX(
FILTER(ALL('Table'),
[Directorate]=EARLIER('Table'[Directorate])&&
[Expenditure Type]=EARLIER('Table'[Expenditure Type])),[Estimated Budget]),
"Level","2")
return
UNION(
_table1,_table2)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- snehasissamal2 years agoFrequent Visitor
Thank you Anonymous . This is what I was trying to get.
In case I need a filter(Slicer) for Sector/Year, for example, if 2024 and Sector A is selected then the Sankey chart should show 2024 and Sector A data only, what will be a good approach and which table I should filter?