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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tgjones43
Helper IV
Helper IV

Conditional column based on values in multiple rows

Hi all

 

I have 2 columns, the first a survey number, the second an observation value. There can be one or many observation values for each survey. Each survey was either collected using an old method, where the values are essentially categories given the number 3, 33, 333, 3333 or 33333, or a new method, where the values are real numbers. I need a way of adding a column that can report Old for the old method, New for the new method. So in the example below, surveys 1 and 3 used the old method because all values are only 3, 33, etc.

 

Is this possible?

 

SurveyValueRequired
13Old
133Old
13Old
1333Old
133333Old
133Old
13Old
133Old
13Old
1333Old
13Old
13Old
24New
27New
217New
21New
23New
245New
232New
33Old
43New
47New
1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @tgjones43 ,

You can use following calculate column formula to achieve your requirement:

Tag Column =
IF (
    [Survey] IN { 1, 3 }
        && [Value] IN { 3, 33, 333, 3333, 33333 },
    "Old",
    "New"
)

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @tgjones43 ,

You can use following calculate column formula to achieve your requirement:

Tag Column =
IF (
    [Survey] IN { 1, 3 }
        && [Value] IN { 3, 33, 333, 3333, 33333 },
    "Old",
    "New"
)

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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