Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
RishabhTFC
Contributor III
Contributor III

Sum if One column value is greater than other

Hello

I am stuck in a problem where I have to find the Sum(sales) in a KPI, I want those sum from sales whose sales value is not greater than forecast.

 

ModelsForecastSalesAdjusted Forecast
MD-1976532
MD-2791465
MD-341635
MD-451600
MD-512102
MD-640550
    
Output ComingSum(Sales)210 
Output WantsSum(Sales)95 

can anybody help me with that

 

Thanks

RM

 

Labels (1)
3 Replies
sunny_talwar

Try this

Sum({<Models = {"=Sum(Sales) < Sum(Forecast)"}>} Sales)
Frank_Hartmann
Master II
Master II

see attached qvw.

hope this helps

sunny_talwar

Frank - 

Checking it against Forecast is not a good idea here. What if we have two forecast numbers which are same but with different sales? I think checking it against Models make more sense here.