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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
AgustinLopez
Frequent Visitor

Labbel with previous year data

Hello, I'm new in Power Bi and I have some trouble making some DAX if you can help me be appreciate.

I have the following data.

AgustinLopez_0-1607635211030.png

And I'm showing it in a Bar Chart

AgustinLopez_1-1607635244952.png


Also, I have some labels that when you click in one bar show some data of that bar, but also I need to show in a label the shipment YTD of the previous year. I have a Year Column

If I click the bar of the season 2019-2020 March I need to see the value Shipment YTD of 2018-2019 March

Can you help me with the DAX
Thanks!

 

1 REPLY 1
Pragati11
Super User
Super User

Hi @AgustinLopez ,

 

I wrote a blog sometime back in which I have shown previour year sales calculation.
When you click on a bar with current year sales, the card visual on the top shows the previous year sales.

Link to the blog:

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Labbel-with-previous-year-data/m-p/1543956

 

I think this will ive you an idea for your requirement.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.