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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors