Forum Discussion
How to display filter values on same page as filter itself?
- 8 years ago
Hi ppgandhi11
You can create a calculated measure similar to the following and just drag it to a Card Visual on your report canvas. It will display the currently selected value from the table[column] from your slicer.
Measure = SELECTEDVALUE('Table 2'[Column])
Phil_Seamark if we select multiple values then how can we do it?
This is the method I've used. The measure below will return nothing ("") if the 'Products'[Type] field isn't filtered. If that column has been filtered and there are more than 5 rows selected then it returns "Multiple". Otherwise, I use CONCATENATEX to grab all the values selected and use a comma and space to seperate each value of 'Products'[Type]. Before the CONCATENATEX I have some other text that will concatenate some user friendly text. If a user selects 2 Products[Type] values the whole measure will return "| Type - Type Selection 1, Type Selection 2". So I then repeat this measure for each column in the table that might have a filter selected by the user.
Selected Type =
IF (
ISFILTERED ( 'Products'[Type] ),
IF (
COUNTROWS ( VALUES ('Products'[Type] ) ) >=5,
"Multiple",
" | Type - "&
CONCATENATEX ( VALUES ( 'Products'[Type]), 'Products'[Type], ", " )
)
),
""
)
)
Then I add a measure that concatenates all the selection measures and put them in a visualization that supports text, like a card. The final measure might look like [Selections] = [Selected Type]&[Selected Sub Type]. I don't have worry about separating text because those are in the selection measures. Result example: "| Type - Type 1 | Sub Type - Sub Type 1, Sub Type 2".