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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Combine two similar values into one measure depending on the year

Hi guys,

I've got one table with the columns 'year' and 'price' and I use 'year' as the x-axis of my line diagram. For the years 2022 - 2025 I use the price values from the same table, but for the years 2020-2021 I have to use price values from another table. How can I express this issue in DAX?

 

Best regards

1 REPLY 1
lbendlin
Super User
Super User

Use SELECTEDVALUE() or equivalent to sense where on the visual you are (in your case where on the x axis) and then calculate the measure value accordingly. 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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