Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
iahmadmca1
Contributor III
Contributor III

Segregate the value positive and negative.

Team,

jus want to let you know I have one expression which giving both values positive and negative based on expression want separate value for negative and positive could you please help me to do this.please find the below expression.

=Round((Sum(Rolling_1_days.Counts)-above(TOTAL sum(Rolling_1_days.Counts) ))/above(TOTAL sum(Rolling_1_days.Counts) ),0.001)

As for example:

Table:

SeasionDegree
summer         5
winter        -5

output(positive)

A:

SeasionDegree
summer         5
       

output (Negative)

B:

SeasionDegree
        
winter        -5

Note: I need both outputs based on above expression.

Thanks,

Irshad Ahmad

10 Replies
sunny_talwar

May be this, table 1

RangeMax(Round((Sum(Rolling_1_days.Counts)-above(TOTAL sum(Rolling_1_days.Counts) ))/above(TOTAL sum(Rolling_1_days.Counts) ),0.001), 0)

table2

RangeMin(Round((Sum(Rolling_1_days.Counts)-above(TOTAL sum(Rolling_1_days.Counts) ))/above(TOTAL sum(Rolling_1_days.Counts) ),0.001), 0)

iahmadmca1
Contributor III
Contributor III
Author

Thanks, Sunny.let me try and get back to you

iahmadmca1
Contributor III
Contributor III
Author

Sunny i tried your expression but its not working, could you please give the other logic for achieving this problem.

sunny_talwar

Logic is simple... for the first table where you want to just show positive values, I am forcing negative values to be 0 using RangeMax()

RangeMax(Expression, 0) -> When Expression gives 5 -> 5> 0 -> 5

                                               When Expression gives -5 -> -5 < 0 -> 0

Similarly, picking the negative values in the second table and forcing positive values to be 0 using RangeMin() function

iahmadmca1
Contributor III
Contributor III
Author

Sunny i have one straight table which is containing both values positive and negative from that table value i want to separate in two table.

source Table expression:


=Round((Sum(Rolling_1_days.Counts)-above(TOTAL sum(Rolling_1_days.Counts) ))/above(TOTAL sum(Rolling_1_days.Counts) ),0.001)


Source Tabel:

SeasionDegree
summer        5
winter        -5
summer    4

Output table

A:

SeasionDegree
summer        5
summer    4

Output table.

B:

SeasionDegree
winter        -5

Note: don't consider the blank field of table  A and B I need only value

Thanks,

Irshad Ahmad

sunny_talwar

That is what it should do my friend.... if you can share a sample where it isn't working, I can pinpoint the issue...

iahmadmca1
Contributor III
Contributor III
Author

Now it is working Sunny I did small changes in dimension thank for your collaboration.

sunny_talwar

What was the change in dimension that you made?

iahmadmca1
Contributor III
Contributor III
Author

I am using Rolling_2_days.Counts instead of Rolling_1_days.Counts that is it.