Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try in a text box like:

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

View solution in original post

10 Replies
tresesco
MVP
MVP

Try in a text box like:

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

rajat2392
Partner - Creator III
Partner - Creator III

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.

sudeepkm
Specialist III
Specialist III

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.

anbu1984
Master III
Master III

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

Not applicable
Author

Hi

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

brgs

Not applicable
Author

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

tresesco
MVP
MVP

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

Not applicable
Author

qw error1.png@

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

tresesco
MVP
MVP

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