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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

IF(string=value) only validates on 1 value but I want an OR in the value to be counted

I have a text field that has a the value max-age=63072000;includeSubdomains and sometimes it is max-age=63072000;includeSubdomains; preload
I want to count together the max-age=63072000;includeSubdomains and the max-age=63072000;includeSubdomains; preload as okay. How can I do that, I have 

HSTS_OKAY = IF(TRIM('Scan_Strict-Transport-Security'[Scan.response_headers.strict-transport-security])=LOWER("max-age=63072000; includeSubdomains"),"HSTS Good","HSTS is NOT OKAY")
But that leaves the ones with preload as NOT OKAY which must be counted as good
2 ACCEPTED SOLUTIONS
Sergii24
Super User
Super User

Hi @Anonymous, you can use Containsstring() fucntion (CONTAINSSTRING function (DAX) - DAX | Microsoft Learn )

 

HSTS_OKAY = 
    IF(
        CONTAINSSTRING( 'Table'[Value], "max-age=63072000;includeSubdomains" ) = TRUE(),
        "HSTS Good",
        "HSTS is NOT OKAY"
    )

 


This will give you the following result:

Sergii24_0-1727875572564.png

 

Good luck!

View solution in original post

Anonymous
Not applicable

Thank You Sergii24 !! I will try

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank You Sergii24 !! I will try

Sergii24
Super User
Super User

Hi @Anonymous, you can use Containsstring() fucntion (CONTAINSSTRING function (DAX) - DAX | Microsoft Learn )

 

HSTS_OKAY = 
    IF(
        CONTAINSSTRING( 'Table'[Value], "max-age=63072000;includeSubdomains" ) = TRUE(),
        "HSTS Good",
        "HSTS is NOT OKAY"
    )

 


This will give you the following result:

Sergii24_0-1727875572564.png

 

Good luck!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.