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

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

Reply
Anonymous
Not applicable

Create measure using 2 columns

I am looking to create a measure to display the data in column 2 for the year in column 1.  I need to use this measure in a card to filter with the date table year.

Year is formated as a whole # and Rate is formatted as decimal #

Year          Rate

2021        .69

2022        .58

2023        .59

2024        .59

 

Thanks!

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Anonymous - I think you donyt have any relationship between rate and date table, follow the below 

create a measure as :

Selected Year Rate =
VAR SelectedYear = SELECTEDVALUE('Date'[Year]) -- Year selected from Date table
RETURN
CALCULATE(
MAX('RateTable'[Rate]), -- Replace 'RateTable' with your actual table name
FILTER(
'RateTable',
'RateTable'[Year] = SelectedYear
)
)

Let me know if this solution works for your scenario!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

 

Thanks for the reply from rajendraongole1 and Ray_Minds .

 

@Anonymous , Does their methods solve your problem? If so, could you please mark their answer as solution? This will help more users who are facing the same or similar difficulties. Thank you!

 

Best Regards,
Yulia Xu

Ray_Minds
Continued Contributor
Continued Contributor

Hi @Anonymous 

To create a measure that displays the Rate for the selected Year,you can follow these steps:
1).Ensure that your date table has a relationship with the table containing the Year and Rate columns.

2).Create a new measure in Power BI with the following DAX formula:

Selected Year Rate =
VAR SelectedYear = SELECTEDVALUE('DateTable'[Year])
RETURN
CALCULATE(
MAX('YourTableName'[Rate]),
'YourTableName'[Year] = SelectedYear
)

Note:- Make sure to replace 'YourTableName' with the actual name of your table and 'DateTable'
with the name of your date table.
You can now use this measure in a card visual.

If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.

rajendraongole1
Super User
Super User

Hi @Anonymous - I think you donyt have any relationship between rate and date table, follow the below 

create a measure as :

Selected Year Rate =
VAR SelectedYear = SELECTEDVALUE('Date'[Year]) -- Year selected from Date table
RETURN
CALCULATE(
MAX('RateTable'[Rate]), -- Replace 'RateTable' with your actual table name
FILTER(
'RateTable',
'RateTable'[Year] = SelectedYear
)
)

Let me know if this solution works for your scenario!





Did I answer your question? Mark my post as a solution!

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors