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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
xad
New Member

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 @xad, 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

xad
New Member

Thank You Sergii24 !! I will try

View solution in original post

2 REPLIES 2
xad
New Member

Thank You Sergii24 !! I will try

Sergii24
Super User
Super User

Hi @xad, 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
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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