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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
DorFey
Frequent Visitor

Each if clauses - Text comparisons

Unfortunately, I only have a rudimentary knowledge of PowerQuery and would need some assistance.

 

I would like to create a user-defined column in which text entries from another column are evaluated.

 

= Table.AddColumn(#"Umbenannte Spalten", "Vers_act", each if Text.Contains([BricsCAD Version], "Pro") then "Pro Version" else
each if Text.Contains([BricsCAD Version], "V19") then "Lite Version" else
each if Text.Contains([BricsCAD Version], "V20") then "Lite Version" else null)

 

Expected result -> column with entries: Pro Version, Pro Version, Lite Version, Lite Version....

 

Generated result:

deviation.JPG

 

Can you provide a small explanation, why the other statements aren´t recognized / a function gets returned instead of a Text /String?

 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @DorFey ,

 

I reproduced your issue.

vstephenmsft_0-1677825533471.png

Please remove "each" and it will be correct.

2.png

vstephenmsft_1-1677825821308.png

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

View solution in original post

2 REPLIES 2
DorFey
Frequent Visitor

Thank you very much for your help, really appreciate that 🙂

v-stephen-msft
Community Support
Community Support

Hi @DorFey ,

 

I reproduced your issue.

vstephenmsft_0-1677825533471.png

Please remove "each" and it will be correct.

2.png

vstephenmsft_1-1677825821308.png

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors