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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Argument '18' in SWITCH function is required.

Hi All,
Getting error as -  "Argument '18' in SWITCH function is required"


case1 = SWITCH(TRUE(),
Metrics[Methodology-project_type] = "Agile",
(SWITCH(TRUE(),Metrics[MyWizard_Metric_Name] = "Sprint" &&
(isblank([MetdefAgile_Sprint_Velocity_Ratio_Agile--overall&auto])||[MetdefAgile_Sprint_Velocity_Ratio_Agile--overall&auto]= "")
&&[MyWizard_Metric_Value]>=0 && ISBLANK([N/A]) && Metrics[Agile-cond] in{"All","One"} &&
Metrics[MyWizard_Metric_Value]<> BLANK(),1,
--
Metrics[MyWizard_Metric_Name] = "Rework" && ([MetdefAgile_Cost_of_Rework_Agile-overall&auto] = blank() ||
[MetdefAgile_Cost_of_Rework_Agile-overall&auto] = "")&&
[MyWizard_Metric_Value]>=0 && ISBLANK([N/A]) && Metrics[Agile-cond] in{"All","Top4"} && [MyWizard_Metric_Value]= blank(),1,
--
Metrics[MyWizard_Metric_Name] = "Overall" && ([MetdefAgile_Overall_Defect_Rate-overall&auto] = blank()||
[MetdefAgile_Overall_Defect_Rate-overall&auto] = "") && [MyWizard_Metric_Value]>=0 &&
ISBLANK([N/A]) && Metrics[Agile-cond] = "All" && [MyWizard_Metric_Value]= blank(),1,
--
Metrics[MyWizard_Metric_Name] = "Automation" &&([MetdefAgile_Test_Automation_Penetration-overall&auto] = blank() ||
[MetdefAgile_Test_Automation_Penetration-overall&auto] = "") &&
[MyWizard_Metric_Value]>=0 && ISBLANK([N/A]) && Metrics[Agile-cond] in{"All","Top4"}
&& [MyWizard_Metric_Value]= blank(),1,
--
Metrics[MyWizard_Metric_Name] = "Testing" && ([MetdefAgile_Testing_Effectiveness_Agile-overall&auto] = blank()
||[MetdefAgile_Testing_Effectiveness_Agile-overall&auto] = "") && [MyWizard_Metric_Value]>=0 &&
ISBLANK([N/A]) && Metrics[Agile-cond] ="All" && [MyWizard_Metric_Value]= blank(),1,
--
Metrics[MyWizard_Metric_Name] = "Test",([MetdefAgile_Test_Case_Pass_Trend_Agile-overall&auto] = blank()
||[MetdefAgile_Test_Case_Pass_Trend_Agile-overall&auto] = "") && [MyWizard_Metric_Value]>=0 && ISBLANK([N/A])
&& Metrics[Agile-cond] = "All" && [MyWizard_Metric_Value]= blank(),1,
--
Metrics[MyWizard_Metric_Name] = "Test1",([MetdefAgile_Test_Artifact_Execution_Trend_Agile-overall&auto]= blank()
||[MetdefAgile_Test_Artifact_Execution_Trend_Agile-overall&auto] = "") && [MyWizard_Metric_Value]>=0 && ISBLANK([N/A])
&& Metrics[Agile-cond] = "All" && [MyWizard_Metric_Value]= blank(),1,)),
)

please suggest on this error, how to fix

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try like

 

SWITCH(TRUE(),
Metrics[Methodology-project_type] = "Agile",
SWITCH(TRUE(),Metrics[MyWizard_Metric_Name] = "Sprint" &&
isblank([MetdefAgile_Sprint_Velocity_Ratio_Agile])||[MetdefAgile_Sprint_Velocity_Ratio_Agile--overall&auto]= "")
&&[MyWizard_Metric_Value]>=0 && ISBLANK([N/A]) && Metrics[Agile-cond] in{"All","One"} &&
Metrics[MyWizard_Metric_Value]<> BLANK(),1,
--
Metrics[MyWizard_Metric_Name] = "Rework" && ([MetdefAgile_Cost_of_Rework_Agile-overall&auto] = blank() ||
[MetdefAgile_Cost_of_Rework_Agile-overall&auto] = "")&&
[MyWizard_Metric_Value]>=0 && ISBLANK([N/A]) && Metrics[Agile-cond] in{"All","Top4"} && [MyWizard_Metric_Value]= blank(),1,
--
Metrics[MyWizard_Metric_Name] = "Overall" && ([MetdefAgile_Overall_Defect_Rate-overall&auto] = blank()||
[MetdefAgile_Overall_Defect_Rate-overall&auto] = "") && [MyWizard_Metric_Value]>=0 &&
ISBLANK([N/A]) && Metrics[Agile-cond] = "All" && [MyWizard_Metric_Value]= blank(),1,
--
Metrics[MyWizard_Metric_Name] = "Automation" &&([MetdefAgile_Test_Automation_Penetration-overall&auto] = blank() ||
[MetdefAgile_Test_Automation_Penetration-overall&auto] = "") &&
[MyWizard_Metric_Value]>=0 && ISBLANK([N/A]) && Metrics[Agile-cond] in{"All","Top4"}
&& [MyWizard_Metric_Value]= blank(),1,
--
Metrics[MyWizard_Metric_Name] = "Testing" && ([MetdefAgile_Testing_Effectiveness_Agile-overall&auto] = blank()
||[MetdefAgile_Testing_Effectiveness_Agile-overall&auto] = "") && [MyWizard_Metric_Value]>=0 &&
ISBLANK([N/A]) && Metrics[Agile-cond] ="All" && [MyWizard_Metric_Value]= blank(),1,
--
Metrics[MyWizard_Metric_Name] = "Test",([MetdefAgile_Test_Case_Pass_Trend_Agile-overall&auto] = blank()
||[MetdefAgile_Test_Case_Pass_Trend_Agile-overall&auto] = "") && [MyWizard_Metric_Value]>=0 && ISBLANK([N/A])
&& Metrics[Agile-cond] = "All" && [MyWizard_Metric_Value]= blank(),1,
--
Metrics[MyWizard_Metric_Name] = "Test1",([MetdefAgile_Test_Artifact_Execution_Trend_Agile-overall&auto]= blank()
||[MetdefAgile_Test_Artifact_Execution_Trend_Agile-overall&auto] = "") && [MyWizard_Metric_Value]>=0 && ISBLANK([N/A])
&& Metrics[Agile-cond] = "All" && [MyWizard_Metric_Value]= blank(),1
) )

 

 

But might need sample file to test

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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