Forum Discussion

SLS's avatar
SLS
Frequent Visitor
7 years ago

Filtered vs. unfiltered values in one visual from separate tables

Essentially we want the same thing as if you had the same visual on a page twice and edited interactions for one to reject all filters. Only in such a way as I can then create a way to easily see the difference (lift), and with the data model using multiple tables.


I have been trying to use things like ALL or ALLSELECTED. But nothing I have tried has really worked.


Using a past data model, we had a team put everything into one table (which we don't want to do) in Power BI and then did this:

Axis = Name
Value = ([D]/[All])*100
D = DISTINCTCOUNT(Table[id]/

CALCULATE(DISTINCTCOUNT(Table[id]),ALLEXCEPT(Table,Table[Field1],Table[Field2]...))

All = CALCULATE(DISTINCTCOUNT(Table[id], ALLEXCEPT(Table,Table[Name]/ CALCULATE(DISTINCTCOUNT(Table[id],ALL(Table))


I appreciate any help! Thanks.

1 Reply

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity Support

    SLS ,

     

    To be general, ALLSELECTED() will not take effect on another table. Though don't know your specific requirement, you may add condition "IN VALUES(Another_Table[ID])" in the filter statement instead of ALLSELECTED().

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.