Reply
Kavya123
Helper III
Helper III

Expression in DAX

Hi All,

 

I need to write this expression in DAX. Please help me

 

=if(responsetype like '*%' and not MaxDate like '*%',text(MaxDate & '%'),text(MaxDate))

 

 

Response Type Max date
###,###,###,##099
###,###,###,##0.0022
###,###,###,##0.00%

text value (ss)

 

None

*

 

 

if response type value is "*" and max date is not "*" than it should display text(MaxDate & '%' )

else text (maxdate)

 

Thanks 

1 ACCEPTED SOLUTION
nitishsh91
Solution Supplier
Solution Supplier

Hi @Kavya123 

 

You can use the following DAX expression:

= IF(AND(SEARCH("%", [Response Type]) > 0, NOT(SEARCH("%", [Max date]) > 0)), CONCATENATE([Max date], "%"), [Max date])

View solution in original post

1 REPLY 1
nitishsh91
Solution Supplier
Solution Supplier

Hi @Kavya123 

 

You can use the following DAX expression:

= IF(AND(SEARCH("%", [Response Type]) > 0, NOT(SEARCH("%", [Max date]) > 0)), CONCATENATE([Max date], "%"), [Max date])

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)