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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
bwisealiahmad
Partner - Specialist
Partner - Specialist

Remove "0" from Empty Line

Hi,


I have a table that has some IF statements I am trying to remove because it loads quite slow sometimes. On lines that are emtpy a "0" comes up and I am trying to remove this. Right now the expressions is:

IF(

Report = Test

IF($(ReportName)_blankrow = 1, ' ', Sum(Expression))

Which produces something like this:

Skjermbilde2.PNG

Now if I remove the _blankrow check part it looks like this.

Skjermbilde1.PNG

Does anyone have a good suggestion for making it look like the first without using an IF statement in the front end?

Thanks,

Ali

1 Solution

Accepted Solutions
sunny_talwar

If the above is working, this should work too

If(Report<>'Hours',

     Pick(RangeSum($(Rapport)_blankrad, 1), Sum({$<$(Rapport)_Traff = {1} >}[Resultat Belopp])/$(B_enhet), ''),

     Pick(RangeSum($(Rapport)_blankrad, 1), Sum({$<$(Rapport)_Traff = {1},_Valutaflagga={'0'} >}Quantity_Act), ''))

View solution in original post

23 Replies
sunny_talwar

You can try with Pick() May be....

Pick($(ReportName)_blankrow, '', Sum(Expression))

Assuming the flag for places which have value is 2...

bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

It is either "1" or " "

in the listbox. I've been thinking of trying with "Replace" in the script somewhere.

krishnacbe
Partner - Specialist III
Partner - Specialist III

Try using Set expression

Sum({<$(ReportName)_blankrow={"1"}>}Expression)

sunny_talwar

Then how about this:

Pick(RangeSum($(ReportName)_blankrow, 1), Sum(Expression), ' ')

bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

Pick Match vs Nested If Performance

I am thinking something like this. Maybe a Pick Match combination?

sunny_talwar

The above expression did not work?

bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

Nope:

If(Report<>'Hours',

Pick(RangeSum($(Rapport)_blankrow, 1), Sum({$<$(Rapport)_Traff = {1} >}[Resultat Belopp])/$(B_enhet) , '')

,

Pick(RangeSum(
$(Rapport)_blankrow, 1), Sum({$<$(Rapport)_Traff = {1},_Valutaflagga={'0'} >}Quantity_Act) , '')

)

sunny_talwar

Can you add this as an expression and see what you get?

RangeSum($(Rapport)_blankrow, 1)


Ideally it should show 2 for places you want to see '' and 1 for places where you want to see the sum....

bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

I get a "1" in every single cell in the column.