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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count and Set Analys

Hello,

I cannot get this Count working, what do I do wrong?

= Count({< KundNr = {"=Sum( {$<$(vSetRolling12)>} $(vNettoFörs) )> $(vOmsG)"}>}Distinct KundNr)

kindly

Håkan

13 Replies
tresesco
MVP
MVP

Try replacing double quotes with single quotes in the vSetRolling12 variable definition.

sunny_talwar

Anil -

Why would you ask the OP to remove a set analysis statement bro? This will drastically change the result of the expression. I advice against removing PeriodID

rubenmarin

Hi Hakan, I think you'll need to create a variable that retrieves the different PeriodID to apply so you can avoid the double quotes in vSetRolling12, in example, create a variable vRolling12PeriodID like this:

=Chr(39) & Concat(Distinct {<PeriodID={"Same_conditions_as_in_vSetRolling12"}>} PeriodID, Chr(39) & ',' & Chr(39)) & Chr(39)

Then you can change the condition in vSetRolling12 to:

PeriodID={$(vRolling12PeriodID)}....

// Wich will contain only single quotes. Note that the PeriodID retrieved will be the same for all rows in the chart

Not tested, maybe there is a typo.

Anil_Babu_Samineni

Sunny, I thought that is Simple Expression. I didn't notice those in depth. Anyhow thanks for your inputs

Best Anil, 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