Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a scenario where i need to hide the Dimension based on the user selection.
i am attaching the sample app and datasource.
Please provide me the suggestion on this
any better ?
You can add a conditional show condition on dimensions or measures.
dimension tab, enable conditional:
if( SubStringCount( concat( distinct Region,';'),'US')>0 or SubStringCount( concat( distinct Region,';'),'Ind')>0, 1,0)
any better ?
You can add a conditional show condition on dimensions or measures.
dimension tab, enable conditional:
if( SubStringCount( concat( distinct Region,';'),'US')>0 or SubStringCount( concat( distinct Region,';'),'Ind')>0, 1,0)
noticed a blank row was showing up when UK was selected with US and ind ... corrected that an uploaded new version.
how it works ?
the whole dimension will be conditionally hidden based on this boolean expression that evaluates to TRUE (1) or FALSE (0)
if( SubStringCount( concat( distinct Region,';'),'US')>0 or SubStringCount( concat( distinct Region,';'),'Ind')>0, 1,0)
the concat() function will create a delimitted list of all 'Region' values in the current selection.
So if you select US, Ind, UK ..
concat( distinct Region,';') will return---> US;Ind;UK (; is the delimitter which you can choose but its moot for this purpose)
next part is to test if 'US' or 'Ind' is in that list and we use substringcount( <list>, 'US') to check if 'US' is in the list
If US or Ind is in the list then its a TRUE and assign 1. Otherwise 0 and hide the whole dimension.
Little tricky but useful one to remember.
It works like a champ.
Thanks Alot Jonathan for both your solution and illustration of the work.
A big cheers and hundred thanks to you