Forum Discussion
Divide numbers from different dates
Hello,
I would like to have one measure which divides Vol 1 numbers by Vol 2 numbers in the same month periods.
Do you know how to create such a mesure? Tried already with calculate but couldn't solve that.
Thanks
Anonymous , With help from a date table, joined with your date of table/s and date tbale columns used on axis/slicer etc
use trailing measure
3 Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-3,Year))
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s- Anonymous3 years ago
Ok, I solved that.
Added additional column in calander table: DATEDIFF(Z_Calendar[Date],01/01/2019,YEAR)
And then replaced "-3" with SUM(Z_Calendar[Datediff covid])
6 Replies
- amitchandak
Super User
Anonymous , one data is available in 2019, another one in 2022, remove year from visual , they will come in the same month
- AnonymousNot applicable
Thanks amitchandak for the answer. It works but actualy my final goal is to have a chart like below where I have to show year 2022. Vol 1 / Vol 2 = infinity so I think it is necessary to solve that inside a measure.
- AnonymousNot applicable
amitchandak
On the screenshot there is only 2022 but I have also forcast data for 2023 which I have to show on the chart so can't remove a year.