Forum Discussion
Hide and Show based on Slicer selection
Anonymous You can create a measure to show the status using below dax syntex. Also turn off the category on the card showing the value.
Status =
(
IF(HASONEFILTER(Data_Type_Selected[ID]),
SWITCH(SELECTEDVALUE(Data_Type_Selected[ID]),
"1", "YES",
"2", "",
"3", "NO"
),
BLANK()
)
Hi negi007 ,
Thanks for your response. But if i have more no. of ID's like 10,000 ID's i cant give it manually so do we have any alternate way for the Status column like status = "Yes" Show else Status = "No" the hide.
Thanks
Prakash
- avatorl6 years ago
Impactful Individual
Then the only way for you - use measures that return empty string (for a card) or blank() (for a table) and conditional formatting to hide all visible elements of a card / table. You don't need write a measure like the above with one row of DAX per each ID, you can use a column in your table.
A measure should return you either visible value or empty string. And you'll need some measures for conditional formatting to hide elements like Category in a card by changing font color to background color.- avatorl6 years ago
Impactful Individual
Example:
Measure := IF (SELECTEDVALUE('Table'[Status]) = "Yes",SELECTEDVALUE('Table'[ID]),"")
will return an ID if selected an id with Status = 'Yes' or empty string if Status = 'No'- Anonymous6 years agoNot applicable
Hi avatorl ,
Yes it is working fine but how to hide column headers in Tables when the status is "No"?
I dont want to show the entire table if the status is No. I can able to hide the values with your suggession but i couldn't able to hide column names.
Thanks
Prakash