Forum Discussion
data showing on user selected month
Rajendrabobade , Try with date table year behind the measure
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
or
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
last year MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
Appreciate your Kudos.
- Rajendrabobade5 years ago
Helper II
Hi,
Thkas for reply .
I need multiple month selection and showing sales value in matrix for last year.
like . in Month filter user choosing Jan then showing jan last year sales
If user select month - Jan and Feb then showing last year sum of sale for Jan and feb month.
kindly suggest base on financial year - last year calculation on chosing multiple month.
Filter -jan and feb
Value - Sum of Jan and feb
100+100=200
filter jan
value - only jan
jan value 100