Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi, this maybe really simple to answer but as im new to this and have not found the answer online after a few hours and countless videos online please help.
I have a custom calender and would like to get the totals of each week number. As this will be over a few years i would like to get the wekly totals from Years & Week. I think i need to create a new column with week totals in? It sfor week on week comparisons but i cant figure out the weekly totals to get that far yet. Thanks for your help in advance.
Solved! Go to Solution.
HI @Anonymous ,
I'd like to suggest you use year and week number as filter conditions to aggregate values.
Measure =
VAR currDate =
MAX ( Table[Date] )
RETURN
CALCULATE (
SUM ( Table[Daily Total] ),
FILTER (
ALLSELECTED ( Table ),
YEAR ( [Date] ) = YEAR ( currDate )
&& WEEKNUM ( [Date], 2 ) = WEEKNUM ( currDate, 2 )
)
)
Regards,
Xiaoxin Sheng
HI @Anonymous ,
I'd like to suggest you use year and week number as filter conditions to aggregate values.
Measure =
VAR currDate =
MAX ( Table[Date] )
RETURN
CALCULATE (
SUM ( Table[Daily Total] ),
FILTER (
ALLSELECTED ( Table ),
YEAR ( [Date] ) = YEAR ( currDate )
&& WEEKNUM ( [Date], 2 ) = WEEKNUM ( currDate, 2 )
)
)
Regards,
Xiaoxin Sheng
Thanks for your help that worked
@Anonymous
Try this:
create measure for daily totals = SUM(dCalender[Daily Total])
and then create new measure along the lines of:
year and week totals = CALCULATE([daily totals], ALLEXCEPT(dCalender[Year & Week]))
Proud to be a Super User!
Paul on Linkedin.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |