Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
northerner
Partner - Contributor III
Partner - Contributor III

Set Analysis - show no records when all dimensions are excluded

I have a simple table with four products:

clipboard_image_0.png

Products A and B are very important to my users, so they should be shown in a table on their own.  There is also a filter allowing a user to select a product:

clipboard_image_1.png

The measure in the table is calculated as: Sum({<Name*={'A', 'B'}>} Value)

This is so that the table shows records for A and B when they are selected or possible.  But if a user selects a Product that is not A or B, then nothing should be shown.

This works ok when A and B are selected or possible e.g.:

clipboard_image_2.png

But it show this when I select Product C:

clipboard_image_4.png

In this case I want to see no rows in the table - A and B are not selected so my users don't want to see any data.

I know I could turn off 'Include zero values' in Data Handling but this is a problem if the value for A or B is 0.  E.g. if the value for A is 0, it's important for my users to see this - they need to know that A has 0 value.

 

I feel like there is an obvious solution to this problem but I can't think what it is.  Any ideas?

Labels (2)
11 Replies
asinha1991
Creator III
Creator III

 did you try unchecking include nulls under your dimension NAME? or you can try this

if(not match(NAME,'A','B'),null(),Sum({<Name={'A', 'B'}>} Value))

northerner
Partner - Contributor III
Partner - Contributor III
Author

Thanks for the suggestion.  However I get this:

clipboard_image_0.png

'Include null values' doesn't make a difference

asinha1991
Creator III
Creator III

then try this

in dimension create

if(match(NAME,'A','B'),NAME)

remove set analysis from expression(redundant)

and uncheck include null values

northerner
Partner - Contributor III
Partner - Contributor III
Author

Thanks for your response but unfortunately this doesn't work:

clipboard_image_2.png

Include null values is unchecked

 

Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi there

Try making Name your Dimension and make your measure this:

Sum({<Name=,Name={'A','B'}>} Value)

Regards,

Mauritz

northerner
Partner - Contributor III
Partner - Contributor III
Author

Thanks for your suggestion.  Unfortunately this doesn't work as when I select Product C in the filter box, Product A and B are displayed in the table.  I need the table to be blank (with no records displayed) when the selected product is not A or B

Ksrinivasan
Specialist
Specialist

Hi,

section access;  is the best solution to your visualization, you can control  what ever you want.

and as your way it will work (Exclude selections will not displayed in selection and  table)

Example:

section access;

load * inline [

ACCESS, USERID, PRODUC_ID

ADMIN, \matr, *

USER, \matr, C

USER, \report, D

];
SECTION APPLICATION;

K. Srinivasan.

StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

try with this expression

Sum({<Name*={'A', 'B'}>} Value+0.001)

suppress 0 values and set format number, so it will show 0 and not 0.001

Ksrinivasan
Specialist
Specialist

@StarinieriG

 

i have tried, but 

it has shows 0.001 value for A, B

clipboard_image_0.png

same old status continue for C and D same :

clipboard_image_1.png

K. Srinvasan