Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
I then want to hide/show the measures in this graph below.
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.
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'
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"
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.
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'
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.
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.