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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Syndicate_Admin
Administrator
Administrator

Comparison of Current Year Deflated vs Previous Year

Good afternoon. Please need your help.

I have two periods anaules of sales distributed monthlymenes dode in each period there was a monthly inflation

jtur_0-1647625459832.png

jtur_1-1647625655832.png

Example in the month of January there was an inflation of 84% from January 2021 to January 2022.

My query is how I can do to deflate the month of January 2022 keeping the same amount of January 2021 in the same graph or table.

Translating it into precise numbers would require that for example January 2021 continues to be $55,741,897 but January 2022 should be $65,474,585

Thank you!!!!

1 ACCEPTED SOLUTION

Hi @Syndicate_Admin  @jtur 

how about using switch() or if() function in that measure? such like 

switch(true(),

min(table[year])= _current_year , your expression1, 

min(table[year])= _last_year , your expression2)

 

 

Best Regards,

Community Support Team _Tang

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

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Good morning. Thanks for the reply but unfortunately this is not what I am looking for.

I already have those two measures that you mention.

Average Annual Inflation = 76%

Sales Selected Year = SUM(Sales[Sales Amount])
Previous Year Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR ('Date'[Date]))

jtur_2-1647869968216.png

When creating two different measures I have no problem sticking to it on the two cards located on the left side of the report.

The problem I have is to be able to present it in the bar graph since it allows me to only locate a single measure and I just want to present in a single measure the selected year deflated through the function DIVIDE (Sales Selected Year, (1 + Annual Average Inflation) and Previous Year Sales

It's possible?

Thank you.

Hi @Syndicate_Admin  @jtur 

how about using switch() or if() function in that measure? such like 

switch(true(),

min(table[year])= _current_year , your expression1, 

min(table[year])= _last_year , your expression2)

 

 

Best Regards,

Community Support Team _Tang

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

amitchandak
Super User
Super User

@Syndicate_Admin , You can try measures like

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))

 

 

or

 

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.