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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of expression question

I'm trying to put an expression into my bar chart the will do a total sum based on the following:

A and B are integers

C is a string

If(A >= B, TextCount(C))

I'm trying to put a calculation into the expression so it does a count where the initial(A >= B) is true

it's probably really obvious what i'm doing wrong but i'm at a bit of a loss right now

i was also wondering whether it is possible to create a field within my chart that i can send these counts to, rather than using my dimensions

any help would be greatly appreciated

1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Ian,

at what level do you want your condition to be verified? At the total level or at the detailed level? If you wanted to verify your condition at the detailed level, then the correct syntax is:

TextCount( If(A >= B, C) )


Otherwise, your condition can only be satisfied if only one value of A and only one value of B is available at the time of the calculation (which probably isn't the case).


Check out my new book QlikView Your Business - in the book, I'm describing in detail how to build QlikView expressions, starting from the very basics (like at what level of details should the calculation happen) and going into very complex expressions with AGGR and Set Analysis


cheers,

Oleg Troyansky

QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense