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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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