Case- Observe the
following screen shot.
In the above image I want to view the prices of the selected
products but it is displaying all the column values from the price list in the multi row card
where it should show nothing when nothing is selected from the product name.
Creating a dax measure which can ensure that the data set is filtered
Let us create a dax measure as following.
Let us create a dax measure as following.
Only when filtered =
IF (ISFILTERED (‘Product’ [ProductName]), "Y”, "N")
This dax measure ensures whether a filtering has happened. If so it returns “Y” otherwise it returns “N”.
Using the above created dax in visual level filter
The above dax measure is applied to the visual level filter of the multi row card as shown below. you can just drag and drop the measure to the visual level filter.
As you can notice I have used the above created measure “Only
when filtered” to display data when it returns “Y”. In other words "Show items when the value contains Y".
This might seem a bit tricky but it is simple and very useful. We can state this as an advanced filtering where we are implementing a condition to show data simply we are filtering using an “If condition”.
This might seem a bit tricky but it is simple and very useful. We can state this as an advanced filtering where we are implementing a condition to show data simply we are filtering using an “If condition”.
Once I implemented this, the result is as expected and it’s
shown below for each cases.
When nothing is selected.
When one product is selected.
When multiple products are selected.
Comments
Post a Comment