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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

General SA Query

Hello Experts,

I have the below query which I want to write in Set Analysis. The Analysis here is a Dimension which has Value and Number fields... WA_LTV is a already calculated field in my DB and the Dimension in this chart is the date...

if(Analysis = 'Value' or 'Number', selected (value or number) * WA_LTV/ sum(value or number))

Will provide more details if required, Thanks in Advance,

Mady

3 Replies
Not applicable
Author

Give us more details and sample data. What you mean by Value or Number. Will have the field information itself as Value or number?

i could convert your above expression as such in to set analysis like below.I`m assuming [value or number] as field name.

sum({<Analysis = { 'Value','Number'}>} [value or number]*WA_LTV) / sum({<Analysis = { 'Value','Number'}>} [value or number])

Not sure this is going to help you.

if this is not correct, please  give us sample data and more explanation.

- Sridhar

Not applicable
Author

Hello Sridhar,

As I explained, the Value and Number are fields in Analysis. So if I select the Value in the selection box, it should pick up Value, wherever I mentioned Value or Number. If I pick Number then it should calculate the formula for the number. Its Either Value or Number whatever the end user selects has to drive the expression.

Hope this helps,

Thanks Again

Not applicable
Author

Mady,

Have a look at the attached application.  You need to go for $ sign expansion on the field names.

Your formule should be something like as follows.

   =sum($(=Analysis)*Conversion)/sum($(=Analysis))

- Sridhar