Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
kristel_tulio
Helper III
Helper III

How to get Last year values ignoring Date filter/slicer

Hi Community, 

 

I would like to ask for your help.

I want to get my total values for selected values this financial year then adding last year total values but ignoring the quarter and year slicer.

 

This should be the values for this FY

kristel_tulio_0-1710815119531.png

 

And I want to get this value for LY comparing them side by side with the selected quarter for this FY in tables

kristel_tulio_1-1710815190056.png

 

2 ACCEPTED SOLUTIONS
Mahesh0016
Super User
Super User

Hello @kristel_tulio 

Total Sale LY =
CALCULATE(
            [Total Sale],PREVIOUSYEAR('Date'[Date])
)


@kristel_tulio  I hope this helps you, Thank You!

View solution in original post

Anonymous
Not applicable

Hi @kristel_tulio ,

First of all, many thanks to @Mahesh0016  for your very quick and effective replies, and I will give some additions below:

1.Create the sample table.

vjiewumsft_2-1711101118394.png

2.Create the new measure to calculate FY.

 

Total_Fy = CALCULATE (
        SUM ('Table'[Values]),
        FILTER (
            ALL ('Table'),
            'Table'[Year] < SELECTEDVALUE('Table'[Year]) || ('Table'[Year] = SELECTEDVALUE('Table'[Year]))
                && 'Table'[Month] <= SELECTEDVALUE('Table'[Month])
        )
    )

 

3.Create the new measure to calculate LY.

 

Total_LY = CALCULATE (
        SUM ('Table'[Values]),
        FILTER (
            ALL ('Table'),
            'Table'[Year] = (SELECTEDVALUE('Table'[Year]) - 1)
        )
    )

 

4.Drag the measure into the card visual.

 

5.Select the year and month. The result is shown below.

vjiewumsft_3-1711101183175.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @kristel_tulio ,

First of all, many thanks to @Mahesh0016  for your very quick and effective replies, and I will give some additions below:

1.Create the sample table.

vjiewumsft_2-1711101118394.png

2.Create the new measure to calculate FY.

 

Total_Fy = CALCULATE (
        SUM ('Table'[Values]),
        FILTER (
            ALL ('Table'),
            'Table'[Year] < SELECTEDVALUE('Table'[Year]) || ('Table'[Year] = SELECTEDVALUE('Table'[Year]))
                && 'Table'[Month] <= SELECTEDVALUE('Table'[Month])
        )
    )

 

3.Create the new measure to calculate LY.

 

Total_LY = CALCULATE (
        SUM ('Table'[Values]),
        FILTER (
            ALL ('Table'),
            'Table'[Year] = (SELECTEDVALUE('Table'[Year]) - 1)
        )
    )

 

4.Drag the measure into the card visual.

 

5.Select the year and month. The result is shown below.

vjiewumsft_3-1711101183175.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Mahesh0016
Super User
Super User

Hello @kristel_tulio 

Total Sale LY =
CALCULATE(
            [Total Sale],PREVIOUSYEAR('Date'[Date])
)


@kristel_tulio  I hope this helps you, Thank You!

Hi @Mahesh0016,

Thank you for responding, but it still not giving me the result I need which ignoring the date slicer.

@kristel_tulio @Anonymous  have you done the Date table to Mark as a Date table?
If you didn't following :

Mahesh0016_0-1711519125819.png


Step 2 = Create Date Key Column in Date table and Value table
DateKeys = INT(
                           FORMAT( Date[Date],"YYYYMMDD")
                         )
same in value table with value date column.

Step 3 :
 Make relantionship between Value table and Date table using "DateKeys" column.

Step 4 : Create others column in Date table as per your need like Year, Month, etc...


Step 5 : Create Measuers for FY & LY 

 

Total_Fy = CALCULATE (
        SUM ('Table'[Values]),
        FILTER(
             ALL('Date'),
                'Date'[DateKeys]<=MAX('Date'[DateKeys])
        )
    )



Total Sale LY =
CALCULATE(
            [Total Sale],PREVIOUSYEAR('Date'[Date])
)
 
Step 6 : Plot slicer and use Date Table column in slicer

>> I have attached a solution file you can also refer to that.

@Anonymous @kristel_tulio I hope you can understand and get your answer following above step.
Thank You! 

Hi @Mahesh0016 and @Anonymous ,

Thank you both for responding. But I think it won't work with the type of report that I have. But I already figured it out and do work around. I might use your suggested calculation in future. Thanks again for helping out!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.