Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

CONTIONAL FILTERS APPLIED TO MEASURES. HOW TO CREATE?

Dear All,

 

I need to setup a conditional filtering according to the country selected.

My database has countries A, B, C and business Units XX, YY, VV, ZZ.

 

The setup requires measures replying to these rules:

Country         Business Unit

A                  XX, YY, VV, 

B                  XX, YY, VV, 

C                  XX, YY, VV, ZZ

 

How do I create conditions respecting these rules, please? All filters are applied to all measures.

 

Thanks!

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    You will need to create a bridge table like below.

    Use [country] as slicer and add VALUES([business Units]) to the filter condition.

    For example to filter the business units selected in slicer table:

    measure = if(selectedvalue('table'[business Units]) in VALUES('slicer'[business Units]),1,0)

    Add this to visual filter and set measure =1 then visual will filtered by selected country.

    If I misunderstand your meaning, please share more details.

     

    Best Regards,

    Jay

2 Replies

  • Anonymous ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

    Appreciate your Kudos.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    You will need to create a bridge table like below.

    Use [country] as slicer and add VALUES([business Units]) to the filter condition.

    For example to filter the business units selected in slicer table:

    measure = if(selectedvalue('table'[business Units]) in VALUES('slicer'[business Units]),1,0)

    Add this to visual filter and set measure =1 then visual will filtered by selected country.

    If I misunderstand your meaning, please share more details.

     

    Best Regards,

    Jay