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
Is there a JavaScript solution / override for that? 😀
I am using the PowerBI-JavaScript SDK,
the custom visual hierarchy slicer works just fine.
But when i have try to use the Tuple filter in the JS SDK for (multi columns selection) it turns out it is not really supported.
slicer_Tuple_Filter = {
$schema: "http://powerbi.com/product/schema#tuple",
target: [
// same table different columns selection
{table: "Table A", column: "column A"},
{table: "Table A", column: "column B"} // same table different columns selection
],
filterType: 6, // can be int 6 or string 'Tuple'
operator: "In",
// value for selected columns
values: [
[ {value: "111"}, // value for column A
{value: "222"}// value for column B
]
]
};
Thank you! 🙂
here is the lick again: