Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
User | Count |
---|---|
117 | |
75 | |
62 | |
50 | |
44 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |