Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic Calculated Column based on Slicer
I am trying to update a value in a calculated column using a slicer selection, to allow the user to see the effect of allowing a greater time to time to pay. I have set up a seperate table contai...
Anonymous
6 years agoNot applicable
I want to be able to see the count of customer in each category and then use the category as a filter.
sturlaws
6 years agoResident Rockstar
If you have a separate table,Categories, with 1 column,Category, and Poor, Average and Good on the rows, create a measure like this:
countPrCategory =
SWITCH (
TRUE ();
SELECTEDVALUE ( 'Categories'[Category] ) = "Poor"; CALCULATE (
DISTINCTCOUNT ( Table[customerID] );
FILTER ( Table; ISBLANK ( Table[clearing date] ) || [paysegcheck] = 1 )
);
SELECTEDVALUE ( 'Categories'[Category] ) = "Average"; CALCULATE (
DISTINCTCOUNT ( Table[customerID] );
FILTER ( Table; [paysegcheck] = 0 )
);
SELECTEDVALUE ( 'Categories'[Category] ) = "Good"; CALCULATE (
DISTINCTCOUNT ( Table[customerID] );
FILTER ( Table; [days to pay] <= 0 )
);
0
)
If you also want to filter on these categories, add this measure to the filter part of the visual(s), and set it to greater than 0