Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MEBG93
Creator
Creator

Conditioning table with GetSelectedCount() with 2 selections

Hello experts,

I need to condition a table to show information only when 2 specific dimensions are selected. For instance, the user only needs to see information when one Date and one Location.

I've tried if(GetSelectedCount(Date)>0 and GetSelectedCount(Location)>0, 1,0) and other alternatives of this expression with no success.

Help really appreciated!

Labels (4)
1 Solution

Accepted Solutions
MEBG93
Creator
Creator
Author

Hello @marcus_sommer , sorry about the late response. Initially, this logic is correct, but there's a thing to be considered: Location is an active dimension, which I had to change the expression to this:

if((ActiveDimension='Location' or ActiveDimension='Product') and GetSelectedCount(Date)>0, 1, 0)

Being so, ActiveDimension has two possible dimensions: Location or Product. So in order to function, its needed to define between ORs the possible dimensions within the active dimensions.

Cheers.

MEBG

View solution in original post

4 Replies
tresesco
MVP
MVP

Could you post a sample app where we can see this behavior/issue?

MEBG93
Creator
Creator
Author

Unfortunately I can't. But what I need is to limit the information showed on a table. So on the Calculation Condition expression would be the GetSelectedCount() condition where the user has to select two specific dimension in order to see information on the table.

I've tried with several alternatives using if(GetSelectedCount(Date)>0 and GetSelectedCount(Location)>0, 1,0) with no success

marcus_sommer

In general your approach should work. Make sure that you really call the right dimensions - maybe there several similar ones and/or the real field-names are different to the displayed labels.

Beside this you could simplify your condition a bit with:

GetSelectedCount(Date) * GetSelectedCount(Location)

- Marcus

MEBG93
Creator
Creator
Author

Hello @marcus_sommer , sorry about the late response. Initially, this logic is correct, but there's a thing to be considered: Location is an active dimension, which I had to change the expression to this:

if((ActiveDimension='Location' or ActiveDimension='Product') and GetSelectedCount(Date)>0, 1, 0)

Being so, ActiveDimension has two possible dimensions: Location or Product. So in order to function, its needed to define between ORs the possible dimensions within the active dimensions.

Cheers.

MEBG