# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for
Did you mean:
Creator

## Set Expression with time modifier

I have the following expression:

Sum (if ((Year = CurrentYear) and (Week <= (\$(VECKANRTMP)+10)), SalesBudEUR))

And I want to turn it into a set expression instead. But I'm not sure about how to integrate the +10 modifier.

1 Solution

Accepted Solutions
Partner

Try with

=Sum ({<Year = {\$(=CurrentYear)}, Week={"<=\$(=VECKANRTMP+10)"} >} SalesBudEUR)

7 Replies

I am assuming, These are variables? Perhaps this?

Sum ({<Year = {\$(CurrentYear)}, Week={"<=(\$(VECKANRTMP)+10)"} SalesBudEUR)

OR

Sum ({<Year = {\$(CurrentYear)}, Week={"\$('<=' & VECKANRTMP+10)"} SalesBudEUR)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Creator
Author

CurrentYear and VECKANRTMP are both variables, yes.

Unfortunately, the solutions you provided does not work. It shows no data at all.

Perhaps I should explain my question further:

The Sum (if ((Year = CurrentYear) and (Week <= (\$(VECKANRTMP)+10)), SalesBudEUR))is a sum of the annual budget for the current year (Year = CurrentYear) and then displaying the budget per week in a bar chart for the coming 10 weeks (Week <= (\$(VECKANRTMP)+10)).

My bad, I missed \$ sign here, May be?

Sum ({<Year = {\$(=CurrentYear)}, Week={"<=\$(=VECKANRTMP)+10)"} SalesBudEUR)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Creator
Author

Still no luck

I tried to close the expressions as well:

Sum ({<Year = {\$(=CurrentYear)}, Week={"<=\$(=VECKANRTMP)+10)" >} SalesBudEUR)

Partner

Try with

=Sum ({<Year = {\$(=CurrentYear)}, Week={"<=\$(=VECKANRTMP+10)"} >} SalesBudEUR)

Creator
Author

There we go!

It works as intended - Thanks a lot. Also big thanks to @Anil Babu!

Partner

A good tip for debugging these kind of problems is to create a straight table  where you leave the label for the expression blank. The header of the table will diaplay how the \$ sign expansions are evaluated like

Community Browser