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...
sturlaws
6 years agoResident Rockstar
Hi,
it is not possible to update a calculated column from slicer selection, I'm afraid. You would have to handle it as a measure.
cheers,
S
Anonymous
6 years agoNot applicable
Thanks is there any workaround for this?
- sturlaws6 years agoResident Rockstar
yes, but it depends on what you want to achive. Do you want a list of customers and which category they are in, or the count of customers pr category? Or filter on a category?
- Anonymous6 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.
- sturlaws6 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