Forum Discussion
Dynamic Calculated Column based on Slicer
Hi Anonymous ,
The measure is dynamic but the calculated columns are computed during the database processing and then stored in the model. So In your scenario, we cannot make the calculated column dynamically.
If you want to give customer a type depends on another measure, you can try the following steps.
Create a table contain all the types
create a measure to count by type
TypeCount =
COUNTROWS (
FILTER (
ADDCOLUMNS (
ALL ( FinalImport ),
"Type", IF (
'FinalImport'[Clearing Date] = BLANK (),
"3.Poor Payers",
IF (
[DAYS TO PAY] <= 0,
"1.Good Payers - On Time",
IF (
[paysegcheck] = 0,
"2.Average Payers",
IF ( [paysegcheck] = 1, "3.Poor Payers" )
)
)
)
),
[Type] = SELECTEDVALUE ( TypeTable[Type] )
)
)
The "check" slicer control the measure paysegcheck
BTW, pbix as attached.
Best regards,
Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more
Anonymous,
out of curiosity, what does the code for you measure [paysegcheck] look like?
- Anonymous6 years agoNot applicableI think this is also part of my problem, I need to consider the days to pay for each order seperately, so I think my calculation below is probably incorrect paysegcheck = IF(SUM(FinalImport[DAYS TO PAY]) - [Interval Value] <0, 1, 0)
- sturlaws6 years agoResident RockstarWhen using a measure in the FILTER-function, https://dax.guide/filter/, the measure is evaluated for each row in the table which is filtered. So [paysegcheck] is calculated for each row, if that was what you were worried about.
- Anonymous6 years agoNot applicable
so if I wanted to just show on a chart two lines one for actual days to pay and one for days to pay - my slicer value, what would be the best way to do this?