Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

difference between two columns - display in traffic light

Hi to all,

today I have a new problem with the "traffic lights". In a tablecollum I've calculated the difference between column1 and column2. Now I want to display the result in a Traffic light. If the result of my calculation = 0, then the green light should lit. If the difference is <> 0, the red light should lit.

Sounds very easy, but I'm not able to solve this problem.

Has Anyone an idea?

Thanks & best regards

Stefan

1 Solution

Accepted Solutions
Or
MVP
MVP

Your gauge segments should be set to 0 (green) and 1 (red). Your formula should be:

if(round(sum({$<[Balance Date]={'$(vDatum2)'},Task={'$(vTask2)'},Vers={'$(vVers2)'}>} [GIS EU]))-round(sum({$<[Balance Date]={'$(vDatum1)'},Task={'$(vTask1)'},Vers={'$(vVers1)'}>} [GIS EU]))<>0,1,0)

The idea is to set up a formula that will generate easy-to-handle values, rather than to place your logic in the segments. This is almost always a better policy.

View solution in original post

4 Replies
Or
MVP
MVP

I'm assuming your current calculation is:

Column(1) - Column(2)

In which case you would indeed have a problem with the traffic light you want because of how segmentation works. If this is the case, a simple solution would be:

if(Column(1)-Column(2)<>0,1,0)

Not applicable
Author

Hi Or Shoham,

so, do I put the same formular in both segment startup values?

this is my table:

the difference also could be positive....

the formular ist:

round(sum({$<[Balance Date]={'$(vDatum2)'},Task={'$(vTask2)'},Vers={'$(vVers2)'}>} [GIS EU]))-round(sum({$<[Balance Date]={'$(vDatum1)'},Task={'$(vTask1)'},Vers={'$(vVers1)'}>} [GIS EU]))



the same formular I have in my "Traffic Light"

and so I have configured my Traffic Light:

What did I made wrong?

thanks for your help

best regards

Stefan

Or
MVP
MVP

Your gauge segments should be set to 0 (green) and 1 (red). Your formula should be:

if(round(sum({$<[Balance Date]={'$(vDatum2)'},Task={'$(vTask2)'},Vers={'$(vVers2)'}>} [GIS EU]))-round(sum({$<[Balance Date]={'$(vDatum1)'},Task={'$(vTask1)'},Vers={'$(vVers1)'}>} [GIS EU]))<>0,1,0)

The idea is to set up a formula that will generate easy-to-handle values, rather than to place your logic in the segments. This is almost always a better policy.

Not applicable
Author

Thank you very much, now I did understand.... it works fine.

best regards

Stefan