Forum Discussion
Anonymous
5 years agoNot applicable
Table with indirect filter
Hi all, I am trying to build a custom visual where I can show how a filtered city compares to other cities in its region. For simplicity I have created a sales table and a cities table in follo...
- Anonymous5 years ago
Anonymous
I have revisted this problem for a different report which I found an easy solution. In case someone has a similar question the dax formula is below.
neighbours = VAR currentregion = SELECTEDVALUE ( Cities[Region] ) RETURN SUMX ( CALCULATETABLE ( FILTER ( Sales, Sales[Region] = currentregion ), ALL ( Cities[City] ) ), Sales[Sale] )
dedelman_clng
Community Champion
5 years agoHi Anonymous -
Have you tried putting Region as a calculated column onto the Sales table (presumes a 1-to-many relationship from Table to Sales on "City"?
Region = RELATED(Table[Region])
If not, please share a pbix with sample data and the visuals you have already built.
Hope this helps
David