Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
pindelicato
Contributor III
Contributor III

NPrinting November 2019 - Pixel Perfect Conditional Formatting help needed

So I wanted to start by saying I have read both:

 

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/NPrinting-Pixel-Perfect-Formatting-rule-col...

 

and watched:

https://help.qlik.com/en-US/video/CEXDTVKSoos

I have created a conditional formatting rule for a cell in my table

rule_setup.PNG

 

However in my report it does not format the cell, see the center column in the below pic, anything over .03 should be green. Nothing is.

 

rule_fail.PNG

Just to be clear an up front this is my Condition; Iif([eQZmyR]>0.3,True,False) , I have the table from the Sense report as my level, and the level is Data Member on my Detail Report. I am not sure what else to do.

 

Labels (2)
1 Solution

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

Everything seems correct but it is not working. So I did some more tests and I suppose that for some reasons I don't know the PixelPerfect is interpreting the field as text and not as a number.

Please try a formatting rule formula like ToDouble([eQZmyR]) <0.3 to force the conversion of the field into a double.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.

View solution in original post

8 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

is eQZmyR field added to a report? it needs to be!!! Even if this field is only used as a condition you still need to put it in the level. I usually put those extra fields which i require for formatting at the end and make them 2px wide (as this is the minimum width you can set)

I know it is weird but the field which you want to base your condition on needs to be added to the row where it belongs to work as a condition.

Capture.PNG

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

btw I also make those fields properties set to: Visible: NO

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
pindelicato
Contributor III
Contributor III
Author

thanks for the reply, yes the field is in both my Sense Application and in the Printable report. It is the middle column in the bottom picture itself. Thank you as well for the insight on ensuring I include and hide all fields.

 

Looking at it some more, it appears as if the conditional formatting is looking at the field as a whole for the entire data set instead of the row.

Ruggero_Piccoli
Support
Support

Hi,

The fields used in the formatting rule expression must be part of the details band where the rule is applied. 

Try to write the expression as [eQZmyR]>0.3 instead of Iif([eQZmyR]>0.3,True,False). 

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
pindelicato
Contributor III
Contributor III
Author

rule_example.PNG

So I just wanted to update, I have the field in my level, as well as the detail of the report and in the table itself. I updated to the [eQZmyR]>0.3 , which is what I had done originally until I had seen the other community posts.

 

I am still not getting the conditional formatting to appear. It still seems to be doing the formatting based on the aggregation instead of the row by row value. I tested this because I can write [eQZmyR]<0.3 and get the formatting to color every row even the ones where this is false. That was my last test, so the formatting works, but it isn't working on a row by row level, but on an aggregate level.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

out of curiosity - can you create in your qlik sense app extra column doing the IF( [eQZmyR]<0.3,1,0) and use 1 or 0 values to create your condition in Pixel Perfect. 

This is only to test if the condition is working properly.

Since you are writing your condition based on decimal points it is sometimes tricky to identify what value gets passed to pixelperfect report parser. is your 0.3 maybe 30%or maybe somthing else...for this reason having (just for testing) boolean flag true/false would be good test.

thanks

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Ruggero_Piccoli
Support
Support

Hi,

Everything seems correct but it is not working. So I did some more tests and I suppose that for some reasons I don't know the PixelPerfect is interpreting the field as text and not as a number.

Please try a formatting rule formula like ToDouble([eQZmyR]) <0.3 to force the conversion of the field into a double.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
pindelicato
Contributor III
Contributor III
Author

thank you all for the help and replies, converting it using the ToDouble worked. I am also going to get in the habit of adding flags in my sense apps for testing and for things like this. I appreciate the help!