8 Replies Latest reply: Nov 17, 2016 7:07 AM by Kaushik Solanki

# SET ANALYSIS: SHOW TOTALS WITHOUT SHOWING A VALUE IN THE DIMENSION

cedriclupo@ all,

I am facing some problems when calculating a TOTAL expression:

The problems is focus on one Dimension "Answer", which has two values, Yes and No.

I want my expressions, to be calculating regarding the Yes Answers, but when I have to calculate an Expression called Total Answers, this has to take into account the total Answers (Yes and No) so when I put a total in my expression, the No answer in the dimension appears, and I do not want this value of the dimension to appear.

The actual expression for this total answers that I have already is the following one:

sum( TOTAL<Question, store,date, \$(= GetCurrentField(TotalStores))>

Could some one advice me about how to do this total taking into accoun the "NO" Answers but in the dimension this value not to appear?

You can find an example of the output I would like to get without the No value of the dimension to appear.

• ###### Re: SET ANALYSIS: SHOW TOTALS WITHOUT SHOWING A VALUE IN THE DIMENSION

Hi,

Try this

sum( {<Answer = {"YES"}>}TOTAL<Question, store,date, \$(= GetCurrentField(TotalStores))>

Regards,

Kaushik Solanki

• ###### Re: SET ANALYSIS: SHOW TOTALS WITHOUT SHOWING A VALUE IN THE DIMENSION

However, if I include that restrinction, the total only shows the totals regarding the Yes responses and I want to have the totals of Yes and No.

• ###### Re: SET ANALYSIS: SHOW TOTALS WITHOUT SHOWING A VALUE IN THE DIMENSION

Hi,

Can you share the qvw file with sample.

Regards,

Kaushik Solanki

• ###### Re: SET ANALYSIS: SHOW TOTALS WITHOUT SHOWING A VALUE IN THE DIMENSION

Hi Beatriz, you can try using a different expression for totals, in example:

If (Dimensionality>0, Kaushik'sExpression, YourCurrentExpression)

So row by row it uses Kaushik's expression to show only YES values, for totals use your current expression which uses YES and NO

• ###### Re: SET ANALYSIS: SHOW TOTALS WITHOUT SHOWING A VALUE IN THE DIMENSION

Hello Ruben,

Effectively using an If has solved my problem, I wanted to know if there could be another options instead of using an "If",

• ###### Re: SET ANALYSIS: SHOW TOTALS WITHOUT SHOWING A VALUE IN THE DIMENSION

Hi Beatriz, come to my mind different options (using Pick(), an extra field...) but all based in a check, so it will be similar that use an 'If', if it needs to avoid 'YES' in row but count them in TOTALS this will need a way to decide when count 'YES' or not.

Maybe some other user has a better idea to do this. As a crazy idea you can add a upper level with 3 options:

-YES: related with YES

-NO: related with NO

-TOTAL: related with YES and NO

Sorted by load order. Anyway if it was me I will prefer to go with the 'If' that trying this.

• ###### Re: SET ANALYSIS: SHOW TOTALS WITHOUT SHOWING A VALUE IN THE DIMENSION

Thanks!! Both gave me correct aswers! But I can only select one

• ###### Re: SET ANALYSIS: SHOW TOTALS WITHOUT SHOWING A VALUE IN THE DIMENSION

Hi Ruben,

You didnt steal anything.

And post should be marked as answered which gives exact answer. Because it helps others with similar problem to get exact answer.

Regards,

Kaushik Solanki