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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Multiple IF Conditions using DAX

Hi there, very new to the BI world and queries in general.  Im sure this is a simple ask. 

 

My data set includes list of employees across multiple product lines.   The User name is repeated throughout the excel because its grouped by week start date.  Each user and week combination has the hours they billed for that week.  The product line they work for has a different billing rate.  

 

However, the billing rate and Revenue however are not columns in my data so i have to calculate it per user and then sum the entire Revenue column.  

 

I just want the sum of all revenue generated for the date range selected. 

 

So, if i were to represent the data graphically, it would be something like this.  Assuming the rate per hour for Jane Inc = $10 and Doe Coe = $20

 

any help appreciated!!

 

WeekUserProduct LineHours WorkedRevenue
1A

Jane Inc

10???
2AJane Inc15??
3AJane Inc5?
1BDoe Co20 
2BDoe Co20 
3BDoe Co10 
1CJane Inc15 
2CJane Inc5 

 

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you please share your sample data and expected result to me if you don't have any Confidential Information? Please upload your files to OneDrive for Business and share the link here.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
amitchandak
Super User
Super User

@Anonymous , Try like this

Worked Revenue=
Switch(true(),
[Product] = "Jane Inc", 10,
[Product] = "Doe Coe",20,
10
)*[Line Hours]

 

Better Create a table "Rate"  with Product, Rate . Join on product and try

Worked Revenue=
related(Rate[Rate])*[Line Hours]

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @Anonymous ,

 

Could you please help to show the desired table that you want with a screenshot?

 

So I can try to figure out how to solve it.

 

Thanks.

Aiolos Zhao

vivran22
Community Champion
Community Champion

Hello @Anonymous 

 

It seems that few details are missing from your description. Can you repost with those details?

 

Cheers!
Vivek

https://www.vivran.in/
Connect on LinkedIn

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors