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! Request now

Reply
tim_001
Helper I
Helper I

Select value from a column based on a criteria from another column

Hi, 

 

I tried to find a solution but did not really find what I need. 

 

Database Table: 

Contract TypeYearCustomer
Contract2025Alex
No Contract2026Alex
Contract2025Tim
Contract2026Tim

 

Measure for visual: 

--> What contract does Alex and Tim have in year 2026?

I am thinking a custom column that only considers the data in Year 2026 and if it is not 2026 make it blank. Or a measure that can just find the Contract Type in Year 2026. 

 

I am thankful for any ideas. I might be just stuck in my head and there is a simple solution for it... 

 

Kind Regards

1 ACCEPTED SOLUTION
wardy912
Solution Sage
Solution Sage

Hi @tim_001 

 

I'll give both options, measure and calculated column, both only showing the 2026 data.

 

Measure:

 

ContractType_2026 = 
CALCULATE(
    SELECTEDVALUE('Table'[Contract Type]),
    'Table'[Year] = 2026
)

 

Calculated column:

 

ContractType_2026_Column = 
IF('Table'[Year] = 2026, 'Table'[Contract Type], BLANK())

 

Please give a thumbs up and mark as solved if this helps, thanks!

View solution in original post

4 REPLIES 4
v-hjannapu
Community Support
Community Support

Hi @tim_001,
Thank you for posting your query in Microsoft Fabric Community Forum. Also, thanks to @MasonMA  , for those inputs on this thread. 
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

Thank you

Hi @tim_001,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We are always here to support you.

Regards,
Harshitha.



MasonMA
Community Champion
Community Champion

@tim_001 

 

Hi, in case there are multiple Contract types to handle for same Year,

MasonMA_2-1752853023010.png

you may need to try below Measure

Contracts_2026 = 
CALCULATE(
    CONCATENATEX(
        VALUES('Table'[Contract Type]),
        'Table'[Contract Type],
        ", "
    ),
    'Table'[Year] = 2026
)

 so you will get result like below

MasonMA_1-1752852913878.png

 

 

wardy912
Solution Sage
Solution Sage

Hi @tim_001 

 

I'll give both options, measure and calculated column, both only showing the 2026 data.

 

Measure:

 

ContractType_2026 = 
CALCULATE(
    SELECTEDVALUE('Table'[Contract Type]),
    'Table'[Year] = 2026
)

 

Calculated column:

 

ContractType_2026_Column = 
IF('Table'[Year] = 2026, 'Table'[Contract Type], BLANK())

 

Please give a thumbs up and mark as solved if this helps, thanks!

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