Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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...
  • Anonymous's avatar
    Anonymous
    5 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]
        )