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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
azmeerrehan
Partner - Creator
Partner - Creator

Bar Chart If Statement Issue

I have a BAr chart without any dimensions. I am trying to evaluate the below if condition but the result bar I am getting is ignoring the if statement.  How can I accomplish this Iff statement in my Bar chat.  This statement works fine in a straight table cuz its evaluating it for each row.

If(

Sum({<Date = {"$(vMaxSupply)"} >} current_supply_and_shipped)

>

SUm({<Date = {"$(vMaxSupply)"} >} Net_Planned_Units),

sum({<Date = {"$(vMaxSupply)"}>} current_supply_and_shipped)

-

sum({<Date = {"$(vMaxSupply)"} >} Net_Planned_Units),

0)

Labels (1)
2 Replies
settu_periasamy
Master III
Master III

Hi Rehan,

is that expression working in Straight table without dimension? then i think it will work for Bar chart also.

Maybe try like. (Check the vMaxsupply variable having the Proper value)

Sum({<Date = {"$(vMaxSupply)"} >}

     if ( current_supply_and_shipped > Net_Planned_Units ,

           current_supply_and_shipped - Net_Planned_Units),0)

sunny_talwar
MVP
MVP

What is the dimension when you view this in a straight table? May be you need this

Sum(Aggr(

If(

Sum({<Date = {"$(vMaxSupply)"} >} current_supply_and_shipped)

>

Sum({<Date = {"$(vMaxSupply)"} >} Net_Planned_Units),


Sum({<Date = {"$(vMaxSupply)"}>} current_supply_and_shipped)

-

Sum({<Date = {"$(vMaxSupply)"} >} Net_Planned_Units),

0)

,StraightTableDimension))