To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
again another simple question but maybe im over thinking it.
I'm wanting to calculate the SUM('Table'[Sales]) (At a given time) for the previous year at a given quarter,
I guess my confusion is what if we are not using dates in the visualization itself how could i do this?
I have created a measure:
= Calculate(
Sum('Table'[Sales]),
DateAdd('Table'[Date], -1, YEAR),
'Table'[Quarter] = "Q4"
)
when inserting into the visual it just returns all sales (im assuming because there is no context specifying the date)
So my thought is to maybe include TODAY() but then what if a year on a slicer how would it then work?
Time intelligence helps shifting calculation period. With this code, to show the Q4 of the previous year, you need somewhere in your visual with the context of Q4 of this year.
= Calculate(
Sum('Table'[Sales]),
DateAdd('Table'[Date], -1, YEAR)
)
User | Count |
---|---|
14 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |