Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
arulsettu
Master III
Master III

subtraction and division in pivot table

Hi,

     I am trying to do profit and loss statment. here in pivot doing row wise calculation using flags. my issue is when i try to subtract two rows i am getting same value for every rows. and for division also. when select particular lob it showing correct vale.

please check the sample app and suggest some idea. i am really stuck here

31 Replies
sunny_talwar

I am working on it still. Trying to understand your data and will let you know if I have question.

Best,

Sunny

arulsettu
Master III
Master III
Author

Hi Sunny,

               Any solution for this

Thanks

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this, give expression as Test (For example) and give this expression

Above([Test], 16)/Above([Test], 18)

Hope this helps you.

Regards,

Jagan.

arulsettu
Master III
Master III
Author

Hi Jagan,

          i tried like this

if([Clockwise Calculation]='nr',Above(sum({<TD_DRCR_FLAG={'D'},TBAL_CAL_MONTH=,TBAL_CAL_YEAR=,datefield={">=$(=date(YearStart(max(datefield))))<=$(=max(datefield))"}>}TD_AMT_LC_1)-sum({<TD_DRCR_FLAG={'C'},TBAL_CAL_MONTH=,TBAL_CAL_YEAR=,datefield={">=$(=date(YearStart(max(datefield))))<=$(=max(datefield))"}>}TD_AMT_LC_1),4)/

above(sum({<TD_DRCR_FLAG={'D'},TBAL_CAL_MONTH=,TBAL_CAL_YEAR=,datefield={">=$(=date(YearStart(max(datefield))))<=$(=max(datefield))"}>}TD_AMT_LC_1)-sum({<TD_DRCR_FLAG={'C'},TBAL_CAL_MONTH=,TBAL_CAL_YEAR=,datefield={">=$(=date(YearStart(max(datefield))))<=$(=max(datefield))"}>}TD_AMT_LC_1)),1)

but getting result is 1 for every row

can you please check what i am doing wrong

arulsettu
Master III
Master III
Author

Hi Jagan,

               The code i tried is correct?

jagan
Partner - Champion III
Partner - Champion III

Not sure.  I think you are getting the same value, that is why when you are dividing you are getting 1.  Check this by giving one expression and see the number.

Regards,

Jagan.

arulsettu
Master III
Master III
Author

the value is different but i am getting 1 only. i am doing some mistake. can i uplload the new app i tried

thanks

jagan
Partner - Champion III
Partner - Champion III

Hi,

I think it won't work since you are using the dimension.

Regards,

jagan.

arulsettu
Master III
Master III
Author

any way to achive this jagan. i dont know how to do this.

plz suggest

Thanks

jagan
Partner - Champion III
Partner - Champion III

Previous solution not working?

Regards,

Jagan.