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: 
ryk_budzynski
Partner - Contributor
Partner - Contributor

Conditional formatting based on table column values AND formulas

Hi All

I've been able to conditionally format my table columns using hardcoded values (e.g. [Column_Name] < 55) but I can't see how to do it by comparing the column value against a formula (e.g. [Column_Name] < [Formula Name]). The data binding drop down list in table cell tasks only seems to allow choosing formulas OR levels. Is there something I'm missing here?

Thanks, Ryk.

Labels (2)
5 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

With this information it is not clear what you are referring to:

Could you please provide following information:

  • template you are using: Excel, Word, PixelPerfect, HTML?
  • screenshot of what you are trying to achieve (template and where you are trying to put your comparison to formula)

The above will give us slight indication what are we dealing with here

regards

Lech

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.
ryk_budzynski
Partner - Contributor
Partner - Contributor
Author

Hi Lech

Apologies, it is PixelPerfect.

As an example, see the attached where I'm highlighting the row where Sum(SomeValue) < Avg(Total SumValue).

Thanks, Ryk.

Ruggero_Piccoli
Support
Support

Hi,

In PixelPerfect you need to create a Formatting rule. There are some examples in the articles:

https://community.qlik.com/t5/Qlik-NPrinting-Documents/Conditionally-display-a-label-based-on-the-nu...

https://community.qlik.com/t5/Qlik-NPrinting-Documents/How-to-Manage-PixelPerfect-Conditional-Output...

Then you can customize the format as you prefer.

Note that in a condition you can use only fields that are in the level where the condition is applied.

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

As @Ruggero_Piccoli  said "Note that in a condition you can use only fields that are in the level where the condition is applied." You need to create additional column in your source data (used in Level) with Avg(TOTAL SomeValue) and then compare Iif([Field]<[Field],True,False])....

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,

I agree with @Lech_Miszkiewicz solution. You could also evaluate to add the calculation in the condition:

avg010.png

You need to customize the formula:

Iif([Total Sales] < Avg([Total Sales]),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.