Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
bettina13
Contributor III
Contributor III

Problem with ColumnNo ()

Hello,

I have ab Problem with ColumnNo () used in a Pivottable.

In the example attached the led-light should be yellow when the Columns Show the same value. But one is red, one is yellow.

Here the formula:

If (ColumnNo () = 2 and Sum ( If (Stand_Tag = Today () -1 , Ticket_Anzahl_offen_Tag)) > 0,
If ( Sum ( If (Stand_Tag = Today () -1 , Ticket_Anzahl_offen_Tag)) > Sum ( Ticket_Anzahl_offen_Tag_Vormonate) / 1 * 110 / 100,
'qmem://<bundled>/BuiltIn/led_r.png',

If ( Sum ( If (Stand_Tag = Today () -1 , Ticket_Anzahl_offen_Tag)) < Sum (Ticket_Anzahl_offen_Tag_Vormonate) / 1 * 90 / 100, 'qmem://<bundled>/BuiltIn/led_g.png' ,
'qmem://<bundled>/BuiltIn/led_y.png')),
If (ColumnNo () = 2, 'qmem://<bundled>/BuiltIn/led_g.png' ))

The 3rd Dimension "Stand_Tag" is the title of the Columns.

It seems to be a bug in QlikView.

We are using QlikView for Windows Version 11.20.13405.0 SR 15 64-bit-Edition.

Has anyone an idea for that?

7 Replies
sunny_talwar

I think you might need to use Before/After functions to do this, but difficult to recommend anything before checking it out. Would it be possible to share a sample?

bettina13
Contributor III
Contributor III
Author

Hello Sunny,

thanks for your answer, but the Problem is, that with a previous version it worked. With the actual patch it doesn't work any more.

I have a similar problem in charts, where I use Before/After. But there I can use the columnName instead of ColumnNo.

sunny_talwar

Difficult to say much without taking a stab at the issue. Would you be able to provide a sample to look at? Also provide expected output based on the sample provided.

bettina13
Contributor III
Contributor III
Author

Hello Sunny,

please see the example attached. Sorry, it is in German.

Please compare the first line of "Hamburg", named "Bearbeitung erledigt"

with the first line of "Oldenburg", named "1st Level support". The numbers

in the second column is the same as in the first column, so the led should

be yellow. For Oldenburg it is red.

Hope, you have an idea.

Mit freundlichen Grüßen

Dr. Bettina Schewe

- Geschäftsentwicklung -

sunny_talwar

Hi Bettina -

I don't think you are doing a straight comparison between the two columns

If ( Sum ( If (Stand_Tag = Today () -1 , Ticket_Anzahl_offen_Tag)) > Sum ( Ticket_Anzahl_offen_Tag_Vormonate) / 1 * 110 / 100,

'qmem://<bundled>/BuiltIn/led_r.png',

You to seem to be checking greater then and less than  comparison. and that to not with the striaght value of this period, but with 1 * 110/100. So the comparison is taking place like this:

Capture.PNG

Here you can see that Hamburg is comparing 3 to 3.3 and 1st Level Support is comparing 6 to 5.5.

Is there a reason you are multiplying by 110/100 and 90/100?? May be those are not needed and you need to check for equality?

bettina13
Contributor III
Contributor III
Author

Hello Sunny,

thanks for your tip.

The comparison was o.k., but I the value of one field was wrong.

I found a problem there and now it works.

Bettina

sunny_talwar

Great, I am glad you found the issue. Please close this thread by marking the correct response and any helpful responses.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny