Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have created a measure below to calculate the week to date OEE rate. Somehow it couldn't show up anything (no errors). I have also attached what the date table looks like and the measures to calculate "Units" and "Planned Units Calc". Is this someone that have come across and able to help me with?
Much thanks,
JZ
Hi @Anonymous ,
You can try to add the all() function to the dax formula:
WTD OEE=
var CurrentDate=Max(‘99 Date Table’[Date])
var CureentWeek=Max(‘99 Date Table’[Week])
Return
CALCULATE(DIVIDE([Units],[Planned units calc])),
All(’99 Date Table’[Date)
’99 Date Table’[Date] <= CurrentDate,
’99 Date Table’[Week]=CurrentWeek)
https://docs.microsoft.com/en-us/dax/all-function-dax
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Anonymous , refer my blog for that, you need additional column in date table
Power BI — Week on Week and WTD
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
https://www.youtube.com/watch?v=pnAesWxYgJ8
Weekday = WEEKDAY([Date],2)
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
Measures like
WTD = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank]) && 'Date'[WeekDay]<=max('Date'[WeekDay])-1))
LWTD = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1 && 'Date'[WeekDay]<=max('Date'[WeekDay]) ))
Hi @amitchandak ,
Thanks so much for your reply.
I tried the way you mentioned too somehow it still doesnt work. Please see below. Are you able to advise what has gone wrong?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |