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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
h3x
New Member

IF Row is True display value from Date1 if False display value from Date2

Hello everyone, maybe one of you can help me with this. I have a Table where i need to check a row "category" if it contains certain Values. If one of this Value is True i want to display the value of my Date1 Row if not it need to display the value of the row date2.

 

My Dax Measure looks like this, but i dont know how to display the value from the date rows. Can someone help? Thanks 🙂

 

IF(

CONTAINS('table', 'table'[category], "A") ll

CONTAINS('table', 'table'[category], "B") ll

CONTAINS('table', 'table'[category], "C"),

 

?? DISPLAY DATE1,

 

?? DISPLAY DATE2

)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @h3x ,

You can create a calculated column as below to get it:

Column = 
IF (
    IFERROR ( SEARCH ( "A", 'Table'[category], 1, 0 ), 0 ) > 0
        || IFERROR ( SEARCH ( "B", 'Table'[category], 1, 0 ), 0 ) > 0
        || IFERROR ( SEARCH ( "C", 'Table'[category], 1, 0 ), 0 ) > 0,
    'Table'[Date1],
    'Table'[Date2]
)

yingyinr_0-1670552675965.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @h3x ,

You can create a calculated column as below to get it:

Column = 
IF (
    IFERROR ( SEARCH ( "A", 'Table'[category], 1, 0 ), 0 ) > 0
        || IFERROR ( SEARCH ( "B", 'Table'[category], 1, 0 ), 0 ) > 0
        || IFERROR ( SEARCH ( "C", 'Table'[category], 1, 0 ), 0 ) > 0,
    'Table'[Date1],
    'Table'[Date2]
)

yingyinr_0-1670552675965.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Worked fine! Thank you very much!

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.