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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Peter_2020
Helper III
Helper III

Defined value from 2 columns research

Hi all,

 

I would like to ask for help with following issue:

 

I am working in Direct query mode with 2 different tables:

1. PROJECT - where I have define name of the project and 

2. PRODUCTION - where I have data from production (PO number, operations, hours...), it looks like this:

production[PO NUMBER]project[PROJECT]production[OPERATION]
1060216565AAA0020
1066216548AAA0040
1065165465AAA0090
1066546545BBB0020
1066549877BBB0030
1065496549BBB0040
1066545648CCC0020
1066546548CCC0050
.........

 

And I need to create calculated column or measure to get following numbers based on the project and operation name :

PROJECT AAA:

 - operation 0020 - 3 hours

 - operation 0040 - 4 hours

 - operation 0090 - 5 hours

PROJECT BBB:

 - operation 0020 - 1,6 hours

 - operation 0030 - 2,8 hours

 - operation 0040 - 3,11 hours

PROJECT CCC:

 - operation 0020 - 3,6 hours

 - operation 0050 - 2,1 hours

 

I have tried IF function but there is limitation max 10 repeats.

Thank you for help!

P

 

4 REPLIES 4
amitchandak
Super User
Super User

@Peter_2020 ,

Can you share sample data and sample output in table format?

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

@amitchandak  Sorry but I am not able to share the files. But example of sample data you can find in my first post and as output I have tried this formula:

 

Standard time = SWITCH(Production[Operation],
"0020",0.42,
"0030",0.53,
"0040",1.0,
"0080",2.92,
"0090",21.5,
"0110",7.33)
 
but I need to define somehow that this is just for project AAA and for project BBB,CCC.... I have different values...
Fowmy
Super User
Super User

@Peter_2020 

Where are the hours in your data?

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy  Hours are in PRODUCTION table, but in that case are not imported for me. Hours from these table are totally different like standard hours what I need to calculate.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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