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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Rockiz
New Member

If formula

Hi, I am trying below formula in custom column in power query but its showing error, please help on this
if(and([is_blkd_for_secondary_costs_posting]="x",[is_blocked_for_commitment_posting]="x",[is_blocked_for_plan_primary_costs]="x",[is_blocked_for_plan_revenues]="x",[is_blocked_for_plan_secondary_costs]="x",[is_blocked_for_revenue_posting]="x",[is_blkd_for_primary_costs_posting]="x",[consumption_qty_is_recorded]=x),"lock",
"active")

4 ACCEPTED SOLUTIONS
SachinNandanwar
Impactful Individual
Impactful Individual

I think instead of commas you need to replace them with and



Regards,
Sachin
Check out my Blog

View solution in original post

Does it work ?



Regards,
Sachin
Check out my Blog

View solution in original post

Anonymous
Not applicable

Hi @Rockiz 

 

Here is another approach:

if List.MatchesAll({[Column1],[Column2],[Column3],[Column4]}, each _ = "x") then "lock" else "active"

vjingzhanmsft_0-1722411211034.png

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

Also a good approach, but this will only work under the condition that "x" is the same value across all columns.

View solution in original post

6 REPLIES 6
Rockiz
New Member

Thanks it worked

Anonymous
Not applicable

Hi @Rockiz 

 

Here is another approach:

if List.MatchesAll({[Column1],[Column2],[Column3],[Column4]}, each _ = "x") then "lock" else "active"

vjingzhanmsft_0-1722411211034.png

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Also a good approach, but this will only work under the condition that "x" is the same value across all columns.

Chewdata
Responsive Resident
Responsive Resident


if

[is_blkd_for_secondary_costs_posting]="x" and

[is_blocked_for_commitment_posting]="x" and

[is_blocked_for_plan_primary_costs]="x" and

[is_blocked_for_plan_revenues]="x" and

[is_blocked_for_plan_secondary_costs]="x" and

[is_blocked_for_revenue_posting]="x" and

[is_blkd_for_primary_costs_posting]="x" and

[consumption_qty_is_recorded]=x

then

"lock"

else

"active"

Does it work ?



Regards,
Sachin
Check out my Blog
SachinNandanwar
Impactful Individual
Impactful Individual

I think instead of commas you need to replace them with and



Regards,
Sachin
Check out my Blog

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.