Forum Discussion
h11
Helper III
2 years agoHave a table Appear only few values when a filter is selected
Hello Team, I have a question about filtering the data. I have two columns 1. Name, 2. Status. Initially I would like to show the status of all the names (Approved, In process and Completed) data...
- 2 years ago
You're welcome! If this is helpful, please mark it as a solution 🤠
In order to get what you need, you will need to do the following:- In modeling, create a new table with the following DAX:
VALUES(Table[Name])And add this new column to a slicer on the page
- Create a measure with the following:
Measure = VAR _SelectedValue = SELECTEDVALUE('Table 2'[Name]) VAR _Filtered = CALCULATE(DISTINCTCOUNT('Table'[Name]),FILTER('Table','Table'[Status] IN {"Approved", "In Progress"} && 'Table'[Name]=_SelectedValue))) VAR _All = CALCULATE(DISTINCTCOUNT('Table'[Name])) RETURN IF(ISBLANK(_SelectedValue),_All,_Filtered)- Lastly, on your table, add the measure filter to the visual filter pane and mark the filter as "is not blank"
You should get this as result:
Filtered:
ExcelMonke
Impactful Individual
2 years agoYou're welcome! If this is helpful, please mark it as a solution 🤠
In order to get what you need, you will need to do the following:
- In modeling, create a new table with the following DAX:
VALUES(Table[Name])
And add this new column to a slicer on the page
- Create a measure with the following:
Measure =
VAR _SelectedValue = SELECTEDVALUE('Table 2'[Name])
VAR _Filtered = CALCULATE(DISTINCTCOUNT('Table'[Name]),FILTER('Table','Table'[Status] IN {"Approved", "In Progress"} && 'Table'[Name]=_SelectedValue)))
VAR _All = CALCULATE(DISTINCTCOUNT('Table'[Name]))
RETURN
IF(ISBLANK(_SelectedValue),_All,_Filtered)
- Lastly, on your table, add the measure filter to the visual filter pane and mark the filter as "is not blank"
You should get this as result:
Filtered:
- h112 years ago
Helper III
ExcelMonke Hi
I followed the same steps as you mentioned above. While typing the measure I got this error. Please let me know what to do now?
Thank you!
- h112 years ago
Helper III
ExcelMonke It worked!!! Thanks a ton!!