Forum Discussion
Need to show 'week number' without changing aggregation.
- 6 years ago
The problem is the measure. It evaluates if the min of the week is Sunday. At the day level that returns just Sundays in the visual. When just the Week is present, it is still true but it then uses all the days of that week in the calculation. Please use this expression which gets same results whether Date is there or not.
Total Returning W =
VAR thismin =
MIN ( 'Dates Adj'[Date] )
RETURN
IF (
WEEKDAY ( MIN ( 'Dates Adj'[Date] ) ) = 1,
CALCULATE ( SUM ( [COMMITMENTS] ), 'Dates Adj'[Date] = thismin )
)If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
diogobraga2 , It may be because you have data across years and it is summing up that.
Have week year and try
refer
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
- diogobraga26 years ago
Helper IV
Hi amitchandak! Adding years did not change the result. Any other suggestion? Thank you.