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: 
Emma1
Contributor III
Contributor III

Dynamic expression to read values from from a field

Hello guys,

I am using this hard-coded expression to calculate a percentage of compliant patches with source as UK. There are other values in the field [Source] like EU, US, AF, AS etc for which i would like this expression to calculate. What dynamic expression can help me do this?

Count(distinct {<[Patch]={'Compliant'},[Source]={'UK'}>} [Computer Name])/
Count(TOTAL distinct{<[Source]={'UK'}>} [Computer Name])

 

 

2 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Not enough information to suggest you something, but wonder why don't the below one work

Count(distinct {<[Patch]={'Compliant'}>} [Computer Name])/
Count(TOTAL distinct [Computer Name])

Emma1
Contributor III
Contributor III
Author

Thanks for reaching out.  The expression i need had should have two filters; [Patch] and [Source], with [Source] being the dynamic one. I need a script to calculate patch compliance through a field with different sources.

Kind of a look at the granularity of my data.

NB. All fields have computer name, some are compliant and many are from different sources. so am calculating compliance percentage for all fields