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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
INJAINP
Frequent Visitor

help regarding excluding values in if else

Hello folks,

 

My requirement is as below:

 

i have a field with codes 1 to 10. I want to create a column where if all codes are there then column should give answer as WITH and if values (7 or 8 or 9) are not there (means if codes has value 1,2,3,4,5,6,10) then column should give value as WITHOUT.

 

How to accomplish this ? is there any option to exclude values in If else?

 

Regards

Priyanka

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @INJAINP,

 

You can refer to following formula to compare text value with list of records:

Result =
VAR list =
    GENERATESERIES ( 1, 10, 1 )
RETURN
    IF (
        COUNTROWS ( FILTER ( list, FIND ( [Value], [Code], 1, -1 ) > 0 ) )
            = COUNTROWS ( List ),
        "With",
        "Without"
    )

7.PNG

 

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @INJAINP,

 

You can refer to following formula to compare text value with list of records:

Result =
VAR list =
    GENERATESERIES ( 1, 10, 1 )
RETURN
    IF (
        COUNTROWS ( FILTER ( list, FIND ( [Value], [Code], 1, -1 ) > 0 ) )
            = COUNTROWS ( List ),
        "With",
        "Without"
    )

7.PNG

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors