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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
joris_lansdaal
Creator
Creator

Help: $ expansions and row evalution - Demand within a leadtime

Hello people,

I've got an issue I can't resolve. I have a table with products (BQS_oms) and calculations with leadtime(Leverancier_Leadtime) and demand (Demand_Aantal). For every product I want to calculate the demand for the period between today + the leadtime.

The problem I face is: Not every row (BQS_oms) is evaluated properly to return a matching leadtime.


I started with the below and tried several things.

Sum({<Datum={">=$(=Date(Today()))<=$(=Date(Today()+$(=(Leverancier_Leadtime)) ))"}>} Demand_Aantal )

Sum({<Datum={">=$(=Date(Today()))<=$(=Date(Today()+Max(Aggr({<BQS_oms=>} Leverancier_Leadtime,BQS_oms)) ))"}>} Demand_Aantal )

Sum({<Datum={">=$(=Date(Today()))<=$(=Date(Today()+$(=Max(Aggr(Leverancier_Leadtime,BQS_oms)))))"}>} Demand_Aantal )

The last one seemed to work, but obviously returns the largest leadtime in the entire set, instead of the specific BQS_oms leadtime.

When I select one BQS_oms or one Leadtime it returns the correct demand....

Any idea's?


Sorry but i can't share the qvw

1 Solution

Accepted Solutions
swuehl
MVP
MVP

The set analysis expression (and dollar sign expansion) is only evaluated once per chart, not per dimension line.

What about

Sum( If( Datum >= Today() and Datum <= Today() + Leverancier_LeadTime, Demand_Aantal ))

View solution in original post

2 Replies
swuehl
MVP
MVP

The set analysis expression (and dollar sign expansion) is only evaluated once per chart, not per dimension line.

What about

Sum( If( Datum >= Today() and Datum <= Today() + Leverancier_LeadTime, Demand_Aantal ))

joris_lansdaal
Creator
Creator
Author

Hi swuehl, thanks! That did the trick, simple and elegant solution.