Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
kumarkp412
Creator II
Creator II

changing the value from one row to another row

Hi Friends,

I am facing one problem in the pivot table,

In one row one value should be their , if more than one row then we have to remove other row value in the row

for example:

start dateenddatejan2012feb2012march2012
jan201213013
feb201201010
march20120023

Here i am having the table, in this i want to remove the  second value  in one row(the  row it should have only one value)

and we have to check the condition like if the startdate and end date is same the it should have the value remaining it should be zero

The table should be as

start dateenddatejan2012feb2012march2012
jan20121300
feb20120100
march20120023

i have tried this by many logic but it not working ,

can any give me the idea to solve this issue

Thanks

Kumar

8 Replies
Roop
Specialist
Specialist

Please include your application

sibideepak
Creator II
Creator II

Hi Praveen,

Your both tables showing the same thing !!

Elaborate things to be clear .

oknotsen
Master III
Master III

You could do something with an if statement and a rangesum:

if(rangesum(before(x, y)) > 0, 0, sum(someValue))

Replace x, y and someValue with column, number of columns and the value you are summing.

... but personally it feels like something I would check and/or solve in the script.

May you live in interesting times!
kumarkp412
Creator II
Creator II
Author

Hi Deepak,

No, both the table are different ,

In the first table , if see the start date = jan2012 and end date =march2012 both these having the same values (13,13) and also start date = feb2012 and end date =march2012  both these are also having the same value(10,10)

So i want to show in the chart only one value when both the dates are same i.e when start date  = end date  it should show value and when start date  <> end date then it show as 0.

Thanks

Kumar

kumarkp412
Creator II
Creator II
Author

Hi Onna ,

but you are say different thing like reverse of my issue.

oknotsen
Master III
Master III

Not sure what you are trying to say.

If I understand your problem correct, you have a row with value A, B and C. If value A is above 0, you want B and C to be 0. That what my function does.

If I do not understand you correct, please re-explain what you want to achieve.

May you live in interesting times!
kumarkp412
Creator II
Creator II
Author

Hi Onno,

This is my requriement,

In the first table , if see the start date = jan2012 and end date =march2012 both these having the same values (13,13) and also start date = feb2012 and end date =march2012  both these are also having the same value(10,10)

So i want to show in the chart only one value when both the dates are same i.e when start date  = end date  it should show value and when start date  <> end date then it show as 0.

kumarkp412
Creator II
Creator II
Author

can you give me Small example on this