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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Show

HiTeam,

 

I am having the data with the columns like Date and amount .

 

We are plotted column chart with two values (Current year amt and Previous amt). 

 

Requirement:

1. Current year amount data should show till the today

2. Previous year amount data should display after the today

 

Sample:

Capture.PNG

 

Expected Output:

 

Expected.PNG

 

Let me know if you need any details

 

Thanks,

Siddanth

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Example with date table

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

Amount =SUM(Sales[Amount]) //this year amount

measure  =

if(max(Date[Date]) <=today(), [Amount], [Year behind amount])

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Could you please provide some sample data (exclude sensitive data) and the formula of [PY_Amount] and [CY_Amount] if they are measure or calculated column in order to find the problem cause and provide a suitable solution? Thank you.

In addition, please review the following threads and check whether they can help you resolve the problem.

Comparing this year and last year measure on a bar chart

How to compare Last year and Current Year sales in Power BI?

Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.

amitchandak
Super User
Super User

@Anonymous , Example with date table

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

Amount =SUM(Sales[Amount]) //this year amount

measure  =

if(max(Date[Date]) <=today(), [Amount], [Year behind amount])

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors