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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.