Forum Discussion
IsFiltered() is not working with a calculated column
Hello All,
I've written the below calculated column,
Here the measure [IsFiltered New Date] (IsFiltered New Date = ISFILTERED('Calender table'[New Date])) is returning true or false when displyed in a data card but when I applied this measure into the calculated column then it returns some numbers and not the boolean values
Value's Return =
IF(
RELATED('Mapping Table'[MappingAssetInterval]) = RV_Table[MappingAssetInterval],
BLANK(),
IF(
RV_Table[Return]=0 || RV_Table[Return]=BLANK(),
"NA",
IF(
[IsFiltered New Date],
CONVERT(ROUND(SUM(RV_Table[Return])*100,2),STRING),
CALCULATE(
CONVERT(ROUND(SUM(RV_Table[Return])*100,2),STRING),
RV_Table[ToDate]=MAX(RV_Table[ToDate])
)
)
)
)
I just need this measure to return true of false based on the selection, I can't use measure instead of column because I've to use "Related" function as well.
ThankYou so much in advance
Dinky
2 Replies
- tamerj1
Community Champion
Hi D_Khandelwal
Calculated columns do not interact with the filter context therefore functions like ISFILTERED do not work. What exactly are you trying to achieve?
- D_KhandelwalFrequent Visitor
Hello tamerj1 ,
I've used nested if conditions in my code and one of them is using related function (thats why I've used calculated column because related function does not work with Measures), all the conditions are working fine except below one because isfiltered is not working there, if isfiltered started to work then everything would be sorted because its child conditions are working
IF( [IsFiltered New Date], CONVERT(ROUND(SUM(RV_Table[Return])*100,2),STRING), CALCULATE( CONVERT(ROUND(SUM(RV_Table[Return])*100,2),STRING), RV_Table[ToDate]=MAX(RV_Table[ToDate]) )So either I need alternative of Related function so that I can use measure or else I need alternate of isfiletred function (Instaed of isfiltered I've also tried SelectedValue "NOT(ISBLANK(SELECTEDVALUE('Calender table'[New Date]))) ". please suggest how can I resolve this issue.
Thanks,
Dinky