This time weβre going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I have two tables;
1_client_rate_history;
2_getTimeLogs;
I have to calculate actual revenue per clΔ±ent=πΈπππππ¦ππ π»ππ’ππ π ππππ‘ πππ πΆπππππ‘βπΆπππππ‘ π ππ‘π with considering rate_effective_date which giving to correct client rate for timelogs_date
please help me!!
1_client_rate_history;
2_getTimeLogs;
3_Result table must be like below;
Solved! Go to Solution.
Hi @ezz ,
You can create a calculated column as below in table '2_getTimeLogs' to get it. What's the relationship between rate_effective_date and timelogs_date? The data timelogs_date should be greater than rate_effective_date?
revenue =
VAR _rate =
CALCULATE (
MAX ( '1_client_rate_history'[client_rate] ),
FILTER (
'1_client_rate_history',
'1_client_rate_history'[client_name] = '2_getTimeLogs'[type]
&& '1_client_rate_history'[project_name] = '2_getTimeLogs'[project_name]
&& '1_client_rate_history'[rate_effective_date] <= '2_getTimeLogs'[timelogs_date]
)
)
RETURN
'2_getTimeLogs'[hours_spent] * _rate
If the above ones can't help you figure out, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @ezz ,
You can create a calculated column as below in table '2_getTimeLogs' to get it. What's the relationship between rate_effective_date and timelogs_date? The data timelogs_date should be greater than rate_effective_date?
revenue =
VAR _rate =
CALCULATE (
MAX ( '1_client_rate_history'[client_rate] ),
FILTER (
'1_client_rate_history',
'1_client_rate_history'[client_name] = '2_getTimeLogs'[type]
&& '1_client_rate_history'[project_name] = '2_getTimeLogs'[project_name]
&& '1_client_rate_history'[rate_effective_date] <= '2_getTimeLogs'[timelogs_date]
)
)
RETURN
'2_getTimeLogs'[hours_spent] * _rate
If the above ones can't help you figure out, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 7 | |
| 6 | |
| 6 |