Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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?
Solved! Go to Solution.
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.
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.
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.
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.
User | Count |
---|---|
126 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
116 | |
102 | |
71 | |
61 |