Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Multiple Conditions in an Expression

I have an expression that I am using in a table.

=SUM(IF(PriceScale = 'LevelA', QTY).

I want to introduce an additional piece of logic to this expression.

I have an inline table

 

[PriceScale, Capacity

LevelA, 1000];

My end goal is to be able to say that if 300 tickets have been sold to LevelA, there is a remaining capacity of 700. 

My dimension for my table is the PriceScale.

1 Solution

Accepted Solutions
Highlighted
Master II
Master II

Yes .. It's because you have specified A in the expression  Capacity - SUM(IF(PriceScale = 'LevelA', QTY))

 

TO get for all try below

Capacity - SUM(QTY) 
Learning never stops.

View solution in original post

3 Replies
Highlighted
Master II
Master II

May be thee below.
Capacity - SUM(IF(PriceScale = 'LevelA', QTY))
Learning never stops.
Highlighted
Creator
Creator

 

My visualization is a straight Table (as below)

PriceScale      QTY

LevelA             500

LevelB            300

LevelC             100

etc....

 

The expression works, but only for LevelA, as we are calling that out in the expression. How can we make this apply to all?

Highlighted
Master II
Master II

Yes .. It's because you have specified A in the expression  Capacity - SUM(IF(PriceScale = 'LevelA', QTY))

 

TO get for all try below

Capacity - SUM(QTY) 
Learning never stops.

View solution in original post