Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
EvanBarrick
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
pradosh_thakur
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
pradosh_thakur
Master II
Master II

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

 

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?

pradosh_thakur
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.