Forum Discussion
mfinlay
4 years agoAdvocate II
Prior year calculations based on two dates
Hi Power BI gurus, I have a measure that has two dates associated with it - a booking date and a shipping date. I can get prior year calculations easily for one date, using calculate and dateadd DA...
- 4 years ago
Hi mfinlay ,
You can fix your error, by changing your relationship between booking date and data to 1 -> Many and changing to one way.
Will review the formula next to try to get the correct result
TheoC
4 years agoCommunity Champion
Hi mfinlay
Create a new measure in your Data table as below. This will ignore any filters from both tables and hopefully give you what you're looking for 🙂
Transaction Count (Total CY) =
CALCULATE ( TOTALYTD ( [Transaction count] , Data[Shipping Date] ) , ALL ( 'Booking Date'[Booking Date] ) , ALL ( Data[Booking Date] ) )
Hope this helps mate!
- mfinlay4 years agoAdvocate II
Thanks for your suggestion - I'm afraid I worked from the bottom up and the other reply fixed my issue 🙂
- TheoC4 years agoCommunity Champion
mfinlay LOL! Mate, too good. Best thing about Power BI is that there's a lot of ways to achieve the outcome you're after. And I am pretty sure the richbenmintz approach was much quicker.