Forum Discussion
Anonymous
7 years agoNot applicable
Remove incomplete week
Hi there,
I am plotting a weekly line chart with daily data. I am trying to not show the latest week's data point if the week is incomplete.
My current solution does not work
Adm WK CY = VAR x = year( LASTDATE( MAIN_COR[DATE])) VAR z = WEEKNUM( LASTDATE(MTDdate[Date]), 1) Return CALCULATE( sum( MAIN_COR[ADM]),MAIN_COR[Attribute] = "Actual", MAIN_COR[Year] = x, MAIN_COR[Wkno] < z)
However, if I replace "z" with the current week number itself, "12", it works.
Where am I going wrong here?
4 Replies
- vanessafvgCommunity Champion
Anonymous have you returned(printed) all your variables to test you are getting what you expecting?
- AnonymousNot applicable
vanessafvg Yes if I return the variable z, it gives me "12", the current week number.
- vanessafvgCommunity Champion
Anonymous any chance you can share your pbix?