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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
warrentk80
Creator
Creator

Count values of calculated expression

Hello everyone
I created an object of type graphic tables where I have an expression that displays ok ko or based on the value of other fields

Now I need to insert a text field where you count the number of KO and if it is greater than zero display a warning message

how can I do?

Thank You

Andrea

4 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi Andrea,

could you post a sample qvw please?

Andy

warrentk80
Creator
Creator
Author

Hello,

attached an example
control is a calculated cmapo enhanced confontando A and B

in practice on a text box I would make the number of KO (5)

Thank You

Andrea

awhitfield
Partner - Champion
Partner - Champion

Hi Andrea,

try out this expression in your text box:

=Sum(If(aggr(sum([Colonna A] -[Colonna B]),[Colonna A],[Colonna B])<=0,1,0))

See the attached

Andy

maxgro
MVP
MVP

=

if(

sum(aggr(if([Colonna A]<=[Colonna B], 1, 0), [Colonna A], [Colonna B])) > 0,

'KO: ' & sum(aggr(if([Colonna A]<=[Colonna B], 1, 0), [Colonna A], [Colonna B])),

'')