10 Replies Latest reply: May 7, 2014 10:19 AM by espen skeie

# Use "Show/Hide" function in textbox

Hi

Anyone who can tell me how to get the conditional section to work.

I have a pie-chart showing departments results, but if one department is having a negative result it's not shown in the pie-chart. But then I'd like a text box to appear letting know about it, and showing the departments name and results.

I've tried with a

sum(Profit)<0

but it sum all departments, it doesnt seem to take the dimension into consideration.

Anyone who know how I can check if one or more departments is having a negative result for the selected period?

Kind regards

Espen

• ###### Re: Use "Show/Hide" function in textbox

Try in a text box like:

= 'List of departments with negetive Profit: ' & Concat( Aggr( If(Sum(Profit)<0, Departments) , Departments) , ',' )

• ###### Re: Use "Show/Hide" function in textbox

Thanks, so many good answers and so fast!!

I just wonder, I used a pivot-table instead, but shouldn't it work the same way? I somehow seem to be left with the heading for the first column when the it should be all hidden.

Rgds

Espen

• ###### Re: Use "Show/Hide" function in textbox

Yes, it should work similar way for heading/label as they(expressions) don't take dimensions into consideration.

• ###### Re: Use "Show/Hide" function in textbox

@

Can you spot what I-m doing wrong? You see the text down to the right of the circle saying "Avdeling" and "Resultat". It should be hidden now, but it isn't.

Rgds

Espen

• ###### Re: Use "Show/Hide" function in textbox

Put a count() around your Agg(...  in conditional expression, Like: =Count(Aggr(....))

• ###### Re: Use "Show/Hide" function in textbox

Thanks!!!!

• ###### Re: Use "Show/Hide" function in textbox

Hi Espen,

Use Set analysis. You can use this expression

sum({<Department={'Dept_Name'}>}Profit)<0

for each department name you can check likewise, and whichever is negative, you can show it in a text box.

else in a text box you can aggregate for for all the departments with negative values, and concat them in text box only.

• ###### Re: Use "Show/Hide" function in textbox

you can

1. use fabs() which will give you the absolute value and even the negative one can be visible and you can represent it in different color.

2. you can enable fast change (to straight table) in the PIE chart so that whenever customer wants to see the ones in negative can use fast change to see the straight table.

• ###### Re: Use "Show/Hide" function in textbox

Concat(If(Aggr(Sum(Profit),Dept) < 0,Dept),',')

• ###### Re: Use "Show/Hide" function in textbox

Hi

I suggest you to use bar chart, more appropriate for pos and neg values

brgs