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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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