
Partner - Creator II
2022-07-22
11:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Subtracting from a variable in Set Analysis
I have the below expression -
Sum({<[TRDT_Month_Flag_3]={1},Year_TRDT={($(vFiscalYear))-1}>}[Quantity in Inv Unit])
$(vFiscalYear) stores a value of 2022, but now I want to subtract -1 from it to make 2021.
Please help me.
Labels (7)
Labels
- Subscribe by Topic:
-
Data Load Editor
-
Developers
-
expression
-
General Question
-
Script
-
Set Analysis
-
Variables
1 Reply

Specialist II
2022-07-23
12:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@risabhroy_03 Just one suggestion instead of substracting -1 in the Set Analysis.
Create a separate Variable First like Below:
Let VFiscalPreYear=Year(Addyears(today(),-1))
And then you can use it in the set Analysis
Sum({<[TRDT_Month_Flag_3]={1},Year_TRDT={($(VFiscalPreYear))}>}[Quantity in Inv Unit])
If this resolves your issue, please like and accept it as a solution.
669 Views
