Hi @nmhung49 ,
Change the SPLY formula as follows. Also I am not really sure, why you need a separte Date Dimension Table for this functionality. Change the formula to use Date from the same table as given below
Pls try this
SPLY = VAR _MAX=MAX('Table'[Date]) RETURN CALCULATE(SUM('Table'[Sale]),FILTER(ALL('Table'),YEAR('Table'[Date])=YEAR(_MAX)-1&&MONTH('Table'[Date])<=MONTH(_MAX)))
pls see the attachment below
I'm sorry show 13 not 11, I want to Card 1 st show 30 and Card 2nd show 13 with (Picture #1) because Actual Data have Date 01/01/2020 to 31/05/2021 but DimDate have Date 01/01/2020 to 31/12/2021
@nmhung49 , I check out total of year 2020 is 98. As you have seleced year, That will give you year total.
Also marked DimDate table as date table(option on right on table) and createcolumsn for Month, Yeat etc
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 :radacad sqlbi My Video Series Appreciate your Kudos.
Thanks for you repply
If slicer selected 2021 and Month not selected. I want Card Current Year show 30 and Card Same Period Last Year show 11
Check out the News & Announcements to learn more.
Click here to read more about the October 2021 Release!
Check out the new Power Platform Community Connections gallery!
Mark your calendars and join us for our next Power BI Dev Camp!