Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
robinwiman
Creator
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
stigchel
Partner - Master
Partner - Master

Try with

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

View solution in original post

7 Replies
Anil_Babu_Samineni

I am assuming, These are variables? Perhaps this?

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

OR

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
robinwiman
Creator
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)).

Anil_Babu_Samineni

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

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
robinwiman
Creator
Creator
Author

Still no luck

I tried to close the expressions as well:

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

stigchel
Partner - Master
Partner - Master

Try with

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

robinwiman
Creator
Creator
Author

There we go!

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

stigchel
Partner - Master
Partner - Master

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

Debug$inSet.png