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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

VAR / if error command?

Hello I m having a problem with advanced command. I want to assign cost price to component partlist "Prefix" column, but it needs to be searched on different filter name "FatherItemNo". downgraded subprocess.

 

1.JPG

 

The name of table is StockBillMat_DAT , "FatherItemNo" is product number, "ChildItemNo" is a id number of component. "Prefix" is name of component. Within "ChildItemNo" there is a reference for subprocess, that is available in "FatherItemNo". 

 

"320" is constant for main level of production,

"500" constant for subprocess of 320.

"510" constant for subprocess of 500

 

Firstly filter needs to search for equal number within "FatherItemNo" for main process, example "3209121100" . IF component wasn't found in "prefix" column, go to subprocess. Apply search from "ChildNumberNo" that is available in "FatherItemNo". If name in "Prefix" not found, go to another subprocess.

 

I know its hard to understand, but i can show it live on teams if someone decide to 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Please take a look at switch function.

https://docs.microsoft.com/en-us/dax/switch-function-dax .

If you need detailed formula, please share some sample data and expected result.

 

Best Regards,

Jay

 

Anonymous
Not applicable

refresh

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.