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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Client Rates vs. Default Rates

I have two tables.  The first is employee name, date work was completed, client name, client rate (the rate we charge the client) and hours worked on that client.  This is millions of rows of data for every day of the year, for every 1/4 hour of work going back 10 years.

 

Original Data.jpg

I want to determine how much of a discount the client is getting, by employee, based on the year when the work was completed.  

 

My second table has the non-discounted rates, by employee by year.

Default Rate.jpg

Any recommendations on how to best accomplish this?

 

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Himomforrest,

You could create a calculated column like below

default value =
LOOKUPVALUE (
    T2[defaultvalue],
    T2[name], t1[name],
    T2[Year], YEAR ( t1[DATE] )
)

Then you could try to use  measure like below to calculate climet rate or deault rate *hour

Measure = sum(t1[ClientRate])*sum(t1[Hours])

369.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
dax
Community Support
Community Support

Hi momforrest, 

I am not clear about your requirement. If possible, could you please explain "I want to determine how much of a discount the client is getting, by employee, based on the year when the work was completed." for me? How to calculate client rate? If you want to calculate difference between two table, you could create relationship between two tables on [Name], then create meausre like = min

[cliemnt rate]-min[default rate] to see whether it work or not.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you for the response @dax .

 

I am trying to figure out how to apply the default rate to a line item where it says if NAME=ASMITH and YEAR=year in DATE.

 

If I were to do this in Excel, I could create some simple INDEX, MATCH formulas to drop in the Default Rate but I can't seem to replicate it in Power BI.  After I am able to get the Default Rate applied, I can easily create the rest of the formulas.

 

Complicated illustration.jpg

dax
Community Support
Community Support

Himomforrest,

You could create a calculated column like below

default value =
LOOKUPVALUE (
    T2[defaultvalue],
    T2[name], t1[name],
    T2[Year], YEAR ( t1[DATE] )
)

Then you could try to use  measure like below to calculate climet rate or deault rate *hour

Measure = sum(t1[ClientRate])*sum(t1[Hours])

369.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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