Year on Year variance SSRS Expression

Nadia Le Roux 0 Reputation points
2023-06-29T11:10:31.37+00:00

Hi

I have an SSRS report with Start and End Date Parameters and I'm struggling to get the variance to work, I want to display current year selection spend with the var vs previous period per month in a matrix.

Thus I'm only selecting 2023 data but need the variance to 2022 same period ?

Example:

Month Spend Var %(To 2022 same month per row)

Jan23 R 1253 15%

Feb23 R 1585 5%

Mar23 R 2323 10%

Current Expression: (Just showing 100% for all)

=(SUM(IIF(Fields!Invoice_Year.Value=CStr(Year(NOW)),1,0)*Fields!TotalSales.Value)-

SUM(IIF(Fields!Invoice_Year.Value=CStr(Year(NOW)-1),1,0)*Fields!TotalSales.Value))

/SUM(IIF(Fields!Invoice_Year.Value=CStr(Year(NOW)),1,0)*Fields!TotalSales.Value)

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,066 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-06-30T07:04:23.9666667+00:00

    Hi @Nadia Le Roux

    I'm not particularly clear about your report design. Can you show it a little bit? This helps me test better for you. Please be careful to hide information that you think is more private.

    Best regards,

    Aniya

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.