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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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