Forum Discussion
Multiple filters on the same two columns
- 6 years ago
Hi Laszlo
I see the next solution.
First add new calculated table
Table 2 = DISTINCT(SELECTCOLUMNS('Table';"Domain";'Table'[domain];"Program";'Table'[program]))Next add measure to Table 2 like this
Measure = calculate(DISTINCTCOUNTNOBLANK('Table 2'[Program]);ALLEXCEPT('Table 2';'Table 2'[Domain]))Then you can create visuals for example
So, if Measure = 2, this domain is including both program, if measure=1 - the only.
P.S. in your dataset example i see not only domain5, but domain4 also has attented session from the only program2
Hi Laszlo
I see the next solution.
First add new calculated table
Table 2 = DISTINCT(SELECTCOLUMNS('Table';"Domain";'Table'[domain];"Program";'Table'[program]))Next add measure to Table 2 like this
Measure = calculate(DISTINCTCOUNTNOBLANK('Table 2'[Program]);ALLEXCEPT('Table 2';'Table 2'[Domain]))Then you can create visuals for example
So, if Measure = 2, this domain is including both program, if measure=1 - the only.
P.S. in your dataset example i see not only domain5, but domain4 also has attented session from the only program2
Thanks very much AZ38!
I, implmented and it and got it working, but just so I understand what is happening.
The new table contains the distinct domains in my source table as well as the distinct programs.
The measure I am not 100% sure how it works. It calculates the distinct without blanks entry of the the program column, so far I am good. The ALLEXCEPT fuction ignores all the filters on the domains column and only apply the filter as it relates to programs.
Thnaks,
Laszlo--