Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I am using SELECTEDVALUE to create a Dynamic column, but Selected value is returning blank and because of that Switch function is not giving proper result.
IdenYear =
Based on the selectedvalue from filter I want to retrun below custom column value.
Thanks
Solved! Go to Solution.
HI @Ahmedx,
AFAIK, current power bi does not support to create dynamic calculated column/table based on filter effects. They do not work on the same level and you can't use the child to effect its parent level.
For this scenario, I think it should be related selectedvalue function itself. It not suitable to handle multiple values.
When you selected on the slicer, it has match with multiple rows and will return blank if you not enabled the alternateResult option to process. (since calculate column not able to receiver the filter effects from slicer, its row contents show match with whole table records)
SELECTEDVALUE function - DAX | Microsoft Learn
Notice: the data level of power bi(from parent to child level)
Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)
Regards,
Xiaoxin Sheng
this is because you have the date as a hierarchy, you need to disable it and create separate columns for the year
I am using Year2 column in the slicer and in selectedvalue.
see how to disable hierarchies
and create a year column like this
Year = YEAR(Date[Date])
It is still not working, I have disbled the setting at Global and Local both levels as you explained above and created Year2 column like
HI @Ahmedx,
AFAIK, current power bi does not support to create dynamic calculated column/table based on filter effects. They do not work on the same level and you can't use the child to effect its parent level.
For this scenario, I think it should be related selectedvalue function itself. It not suitable to handle multiple values.
When you selected on the slicer, it has match with multiple rows and will return blank if you not enabled the alternateResult option to process. (since calculate column not able to receiver the filter effects from slicer, its row contents show match with whole table records)
SELECTEDVALUE function - DAX | Microsoft Learn
Notice: the data level of power bi(from parent to child level)
Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)
Regards,
Xiaoxin Sheng
share the file to help