Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression Help.............!!!

Dear All,

One of my  simple expression i have used in my pivot table is shown below. 

ROUND (RANGESUM (BRO_COMM,AGE_COM,+GRO_COM,-TOT_COM))

I want to hide or remove  the zero values shown as a result of above expression without considering the results of the other expression.

So can you any one help me to find the effective formula instead of the above or what modification i could do.

Thanks.

Priyantha.

Sample Attached herewith.

1 Solution

Accepted Solutions
sunny_talwar

This is what you need to do:

You have 6 expressions in your tables, you need to replace all of them.

Expression 1 needs to be: =If(not IsNull(EXCESS), SUM(COM_PRE+SR+TC)) instead of SUM(COM_PRE+SR+TC)

Expression 2 needs to be: =If(not IsNull(EXCESS), SUM(IF(CAT='BR',(COM_PRE*BR_COM+SR*BR_RS+TC*BR_TC)/100,0))) instead of SUM(IF(CAT='BR',(COM_PRE*BR_COM+SR*BR_RS+TC*BR_TC)/100,0))

Expression 3 needs to be: =If(not IsNull(EXCESS), SUM(IF(CAT='AG',(COM_PRE*AG_COM+SR*AG_RS+TC*AG_TC)/100))) instead of SUM(IF(CAT='AG',(COM_PRE*AG_COM+SR*AG_RS+TC*AG_TC)/100))

Expression 4 needs to be: =If(not IsNull(EXCESS), SUM(IF(CAT='GR',(COM_PRE*11+SR*11+TC*11)/100))) instead of SUM(IF(CAT='GR',(COM_PRE*11+SR*11+TC*11)/100))



Expression 5 needs to be: =If(not IsNull(EXCESS), SUM(CRE)) instead of SUM(CRE)


and finally your Excess expression

Expression 6 needs to be: If(ROUND(RANGESUM(SUM(IF(CAT='BR' (COM_PRE*BR_COM+SR*BR_RS+TC*BR_TC)/100,0)),

  SUM(IF(CAT='AG',(COM_PRE*AG_COM+SR*AG_RS+TC*AG_TC)/100)),

  SUM(IF(CAT='GR',(COM_PRE*11+SR*11+TC*11)/100)),

  -SUM(CRE))) <> 0,

  ROUND(RANGESUM(SUM(IF(CAT='BR',(COM_PRE*BR_COM+SR*BR_RS+TC*BR_TC)/100,0)),

  SUM(IF(CAT='AG',(COM_PRE*AG_COM+SR*AG_RS+TC*AG_TC)/100)),

  SUM(IF(CAT='GR',(COM_PRE*11+SR*11+TC*11)/100)),

  -SUM(CRE))))

I hope you will understand what needs to be done.

Best,

Sunny

View solution in original post

18 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi,

you were nearly there

If(ROUND(RANGESUM(BRO_COMM,AGE_COM,+GRO_COM,-TOT_COM))<>0,ROUND (RANGESUM (BRO_COMM,AGE_COM,+GRO_COM,-TOT_COM)),'')

Andy

sunny_talwar

Please check if this is what you are trying to do? PFA

Best,

Sunny

Not applicable
Author

Hi Andrew,

Your solution removes the zero value of the table instead of removing the relevant raw from the table.

Priyantha.

awhitfield
Partner - Champion
Partner - Champion

Sorry,

but that is what your question said:

'I want to hide or remove  the zero values shown as a result of above expression without considering the results of the other expression.'

Not applicable
Author

Really i made a mistake..

I'm so sorry my friend...

Priyantha.

sunny_talwar

Use following expressions:

  1. =If(not IsNull(EXCESS), SUM(COM_PRE+SR+TC))
  2. =If(not IsNull(EXCESS), SUM(IF(CAT='BR',(COM_PRE*BR_COM+SR*BR_RS+TC*BR_TC)/100,0)))
  3. =If(not IsNull(EXCESS), SUM(IF(CAT='AG',(COM_PRE*AG_COM+SR*AG_RS+TC*AG_TC)/100)))
  4. =If(not IsNull(EXCESS), SUM(IF(CAT='GR',(COM_PRE*11+SR*11+TC*11)/100)))
  5. =If(not IsNull(EXCESS), SUM(CRE))

If(ROUND(RANGESUM(SUM(IF(CAT='BR',(COM_PRE*BR_COM+SR*BR_RS+TC*BR_TC)/100,0)),

   SUM(IF(CAT='AG',(COM_PRE*AG_COM+SR*AG_RS+TC*AG_TC)/100)),

   SUM(IF(CAT='GR',(COM_PRE*11+SR*11+TC*11)/100)),

  -SUM(CRE))) <> 0,

   ROUND(RANGESUM(SUM(IF(CAT='BR',(COM_PRE*BR_COM+SR*BR_RS+TC*BR_TC)/100,0)),

   SUM(IF(CAT='AG',(COM_PRE*AG_COM+SR*AG_RS+TC*AG_TC)/100)),

   SUM(IF(CAT='GR',(COM_PRE*11+SR*11+TC*11)/100)),

  -SUM(CRE))))

HTH

Best,

Sunny

Not applicable
Author

Same results.........!!!

Anyway Thanks a lot for the help extended..

Priyantha.

sunny_talwar

Is this not the output you are looking for???

Table.PNG

Not applicable
Author

I have used your formula a an expression ,

It can not be used from the beginning. so i used the following part only.

"

If(ROUND(RANGESUM(SUM(IF(CAT='BR',(COM_PRE*BR_COM+SR*BR_RS+TC*BR_TC)/100,0)),

   SUM(IF(CAT='AG',(COM_PRE*AG_COM+SR*AG_RS+TC*AG_TC)/100)),

   SUM(IF(CAT='GR',(COM_PRE*11+SR*11+TC*11)/100)),

  -SUM(CRE))) <> 0,

   ROUND(RANGESUM(SUM(IF(CAT='BR',(COM_PRE*BR_COM+SR*BR_RS+TC*BR_TC)/100,0)),

   SUM(IF(CAT='AG',(COM_PRE*AG_COM+SR*AG_RS+TC*AG_TC)/100)),

   SUM(IF(CAT='GR',(COM_PRE*11+SR*11+TC*11)/100)),

  -SUM(CRE)))) "


Any thing wrong i have dine???


Priyantha.