Forum Discussion

abhishekdas72's avatar
abhishekdas72
Frequent Visitor
3 years ago

single slicer to filter two tables

i have a table which shows region , products and sales i am using a slicer to filter through different regions what i want is to see products in one region and their sales but i want to also see same products in different regions.

 

regionproductsales
R1p15950
R1p27598
R1p35377
R1p43562
R1p56363
R1p63238
R2p71780
R2p11691
R2p21001
R2p35426
R2p42950
R2p59799
R2p63774
R3p19835
R3p21870
R3p39881
R3p48243
R3p55838
R3p6

4995

if i insert a slicer based on regions and select R1 , it gives me products & sales available in that region (for ex. R1) in one table, i am replicating the same table but in that replicated table i want to see sales available in other regions (R2,R3) for (same products as shown in R1) . i.e. a single slicer to filter two tables. 

 

1 Reply

  • abhishekdas72 , You need create an independent table with distinct region and create measure

     

    m1= calculate(sum(Sale[sales]), filter(Sales, Sales[region] in value(region[region]) ) )

     

    m2=

    var _tab = summarize(filter(allselected(sales), Sales[region] in value(region[region])  ), sales[product])

    return

    calculate(sum(Sale[sales]), filter(Sales, sales[product] in _tab ) )