cancel
Showing results for
Did you mean:
Regular Visitor

## 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.

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.

Any recommendations on how to best accomplish this?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support

## Re: Client Rates vs. Default Rates

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])`

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.

3 REPLIES 3
Community Support

## Re: Client Rates vs. Default Rates

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.

Regular Visitor

## Re: Client Rates vs. Default Rates

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.

Community Support

## Re: Client Rates vs. Default Rates

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])`

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.

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors