Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
curt1094
Partner - Contributor II
Partner - Contributor II

Hide/Show Graph Measure based on filter selection.

I'm having trouble hiding/showing a line chart measure based on the current selection. I have the following filter setup as buttons using the VizLib extension. 

Filter: Dash_Tbl.Category

Filter: Dash_Tbl.CategoryFilter: Dash_Tbl.Category

 

I then want to hide/show the measures in this graph below.

Graph to filterGraph to filter

 

 I have created individual measures for each of the filter categories. An Example would look something like this:

=Sum({<[BSO]={"FFC"},[Dash_Tbl.Grouping]={"NULO"}>}[Dash_Tbl.Count])

I'm assuming I would add an expression to the visibility condition but all that I tried has not worked. Any help would be greatly appreciated. 

 

 

Labels (1)
1 Solution

Accepted Solutions
vincent_ardiet_
Specialist
Specialist

First, is your filter named [Dash_Tbl.Category] or [Dash_Tbl.Grouping]? I see that both names are used in your initial message.
Else, I guess that you can select multiple measures, right?
So, in this case, you're right, this will not work.
However, this should be better (if the filter is [Dash_Tbl.Grouping]):
Only({<[Dash_Tbl.Grouping]*={NULO}>}[Dash_Tbl.Grouping])='NULO'

View solution in original post

5 Replies
vincent_ardiet_
Specialist
Specialist

If you are also using vizlib line chart, you have a property to control the visibility, you can then put a condition like this:
[Dash_Tbl.Grouping]="NULO"

curt1094
Partner - Contributor II
Partner - Contributor II
Author

I tried this and it did not work. Once I placed the expression in the visibility condition it never displays the measure when selected or not selected. 

vincent_ardiet_
Specialist
Specialist

First, is your filter named [Dash_Tbl.Category] or [Dash_Tbl.Grouping]? I see that both names are used in your initial message.
Else, I guess that you can select multiple measures, right?
So, in this case, you're right, this will not work.
However, this should be better (if the filter is [Dash_Tbl.Grouping]):
Only({<[Dash_Tbl.Grouping]*={NULO}>}[Dash_Tbl.Grouping])='NULO'

curt1094
Partner - Contributor II
Partner - Contributor II
Author

This did seem to work for me, but I'm just not sure why it did. Could you please explain? 

Sorry for the delay in responding, my work schedule has been demanding.

 

vincent_ardiet_
Specialist
Specialist

If you select multiple values even with NULO in your selection [Dash_Tbl.Grouping]='NULO' will not work as the field in your context contents a set of values. You need an aggregation function to manipulate the list.
The set analysis I'm using with the *, is doing an intersection with the current selection. So, if NULO is part of this selection,  this will match. Without the *, this will be always true.