Forum Discussion
PBIfanatic
Helper V
5 years agoSelected Value not returning the value
Hi, What seemed like a simple solution has taken few hours now and still cant figure out the SelectedValue issue. I have a Product table connected to a Promotions table with a relation 1 - many...
Fowmy
Super User
5 years agoPBIfanatic
If you are trying to create a calculated column then you cannot access what is selected in the report from any filter. This is because adding columns take place in the data modeling stage, once you complete that the data load and the model are ready for use in the report.
PBIfanatic
Helper V
5 years agothanks Fowmy
Is there a way to create a column on the fly based on the selected value from a filter?
- Fowmy5 years ago
Super User
PBIfanatic
Yes, absolutely, you can use many table functions in DAX depending on your situation, for exampleFILTER ( ADDCOLUMNS ( VALUES ( 'Date'[Calendar Year] ), "@Amount", [Sales Amount], "@Quantity Wrong", SUM ( Sales[Quantity] ) ), [@Amount] > SELECTEDVALUE( Parameter[Amount] ) )