
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sum values between two specific days/months but for all years
Goodmorning,
I am trying to create a chart that shows a sum of the values subdivided by years. And since here there are no problems, but I am trying to put a line that shows the values between a specific period (01/01/... - 06/30/....) so that doesn't depend on the year. And my values are all based on a date field called Mov_DocDataRiferimento.
Is there a way to achieve this goal?
Thanks,
Zeno
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Probably the most correct solution is to create a new field [Flag First 6 Months] in load script then use it in your expression:
So, the flag should be something like this:
if(num(Month(Mov_DocDataRiferimento))<=6,1,0) as [Flag First 6 Months]
Then, if you create [Flag First 6 Months] in master calendar you can use:
Sum(Value*[Flag First 6 Months])
Otherwise, if you create the flag in your fact table, the expression will be:
Sum({<[Flag First 6 Months]={1}>}Value)
If a post helps to resolve your issue, please accept it as a Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Probably the most correct solution is to create a new field [Flag First 6 Months] in load script then use it in your expression:
So, the flag should be something like this:
if(num(Month(Mov_DocDataRiferimento))<=6,1,0) as [Flag First 6 Months]
Then, if you create [Flag First 6 Months] in master calendar you can use:
Sum(Value*[Flag First 6 Months])
Otherwise, if you create the flag in your fact table, the expression will be:
Sum({<[Flag First 6 Months]={1}>}Value)
If a post helps to resolve your issue, please accept it as a Solution.
