Forum Discussion
Current Rate of Current Week
I am trying to get the current rate from a column but also needs to be pulling from the most current week of the year. Any thoughts or ideas? The year's current week changes every week, so I need to pull the most current week for when I refresh data. I already made the CurrentWk metric and the CRate metric but nee CurrentRate
This formula isn't working.
6 Replies
- amitchandak
Super User
dwel0120 , Try like
CurrentRate = CALCULATE('TABLE1'[CRate], FILTER(ALL('TABLE1'), 'TABLE1'[WkNm] = 'TABLE1'[CurrentWk]))
or better a separate table for week and try like
CurrentRate = CALCULATE('TABLE1'[CRate], FILTER(ALL('Week'), 'Week'[WkNm] = 'TABLE1'[CurrentWk]))
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- dwel0120
Helper III
amitchandak Neither solution worked for me. I tried CurrentRate = CALCULATE('TABLE1'[CRate], FILTER(ALL('TABLE1'), 'TABLE1'[WkNm] = 'TABLE1'[CurrentWk])) and it didn't come up with the correct number and then I created a new "Date" table and tried CurrentCWMRate = CALCULATE ('CwmData'[CwmRate], FILTER(ALL('Date'), 'Date'[Week Number] = 'CwmData'[CurrentWk])) and that didn't work either. When I tried the new Date table it came up BLANK.
- amitchandak
Super User
dwel0120 ,Can you share sample data and sample output in table format?