Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All,
I am stuck on a seemingly simple problem. I have current year values and I need to compare them with last year values. Last year value should be the last working day or last friday of the last year. E.g current year is 2021 then last year last working day is 31st December 2020. But if last year was 2017 then it should fetch 29th December 2017. Is there any dax function which can help? I only need the date value so that I can use it in my measures.
TIA
Solved! Go to Solution.
@amitchandakSorry this didnt work. I followed the following blog from @Greg_Deckler
https://community.powerbi.com/t5/Quick-Measures-Gallery/First-Last-Working-Days/m-p/391545
It helped. I had to modify the dax a bit for my scenario and it worked.
@amitchandakSorry this didnt work. I followed the following blog from @Greg_Deckler
https://community.powerbi.com/t5/Quick-Measures-Gallery/First-Last-Working-Days/m-p/391545
It helped. I had to modify the dax a bit for my scenario and it worked.
@AdityaPowerBI , You can create a week year behind measure with help with a date table marked as a date table
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-364,DAY))
User | Count |
---|---|
84 | |
73 | |
67 | |
42 | |
35 |
User | Count |
---|---|
109 | |
56 | |
52 | |
45 | |
43 |