Forum Discussion
Weekly measures returning blanks!
- 6 years ago
Hi,
Please try to use this measure to show Average engagement for this week:
Average engagement rate for this week =
AVERAGEX (
SUMMARIZE (
DateKey,
'DateKey'[Date],
"T", AVERAGEX (
FILTER (
ALLSELECTED ( DateKey ),
'DateKey'[Week #] = SELECTEDVALUE ( 'DATA'[WEEK NUM] )
),
[Ave Eng Rate]
)
),
[T]
)
And the result shows:
Here is my test pbix file:
Best Regards,
Giotto Zhi
I changed Last week data like
Last Calendar Week Engagement =
var _weeknum = if(max(DATA[WEEK NUM])=1,52,max(DATA[WEEK NUM]))
var _year = if(MAX(DATA[YEAR])=1,MAX(DateKey[Year])-1,MAX(DATA[YEAR]))
Return
CALCULATE(
[Total Engagement],
FILTER(DateKey,DateKey[Week #]=_weeknum && DateKey[Year] =_year)
)
Check if this is correct. Others can be changed in the same manner.
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
- Anonymous6 years agoNot applicable
Hi there amitchandak ,
Thank you so much for your help.
Your measure works perfectly on the example file, but for some reason when I use it in my real file, I'm getting blank again!
Have you any idea why this might be happening?
I've double checked all my number formats, and they're all the same as in the example file...
Thank you again, so much!
Sonia
- Anonymous6 years agoNot applicable
Hi there amitchandak ,
I think I know why it's returning blank! I think it's getting confused with week 53/ week 1 in w/c 30th Dec is throwing it out.
Do you know how to correct this?
Also, I'm hoping you might be able to help me out with the formula for 'week prior to last', and also 'average weekly YTD'??
Thanks again,
Sonia