Forum Discussion
bearideal
3 years agoRegular Visitor
How to retrieve context filter values
Hi there, I am having a small obstacle using the context. This is what I want * Get the context filter values This my table column_name_1 column_name_2 uuid-1 02-01-2023 uuid-...
TomMartens
3 years agoSuper User
Hey bearideal ,
not sure about the requirement "I want to have a column ..."
You can not create a column inside a table that represents the filter value(s). The reason for this:
- a column is created during design time of the data model
- a calculated column (based on DAX) will only be re-calculated during data refresh, a data refresh is not initiated when a report is opened with a filter in the context
You have to create a measure.
I assume this will work:
measurename = countrows( allselected( tablename[columnname] ) )
Hopefully, this provides what you are looking for.
Regards,
Tom