Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have two tables in Power Query.
The first table contains staff information; Name, Cost Rate, Availability (a decimal number for part-time staff), and expected utilisation. If I multiply these all together I get an average daily cost rate.
I also have a calendar table where I've calculated the number of working days (i.e. excluding weekends and public holidays). 1 is a working day and zero is a non-working day.
I want a measure that allows me to multiply the cost rate by the number of working days. I will then filter this value by month. Unfortunately, because my first table doesn't contain any dates I can't create a relationship and so when I try to get this information I see an error that says "Relationships between tables may be needed"
Is there any way around this?
Many thanks,
Chris
Solved! Go to Solution.
You are looking for a CROSSFILTER, a cartesian product of unrelated tables.
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
Hi @OuluChris ,
I try to reproduce.
Here's the sample data.
calendar table
staff information table
Try using Table.RowCount and Table.SelectRows in Power Query.
= Table.RowCount(Table.SelectRows(calendar, each [working days] =1))
Then you can multiply it easily.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @OuluChris ,
I try to reproduce.
Here's the sample data.
calendar table
staff information table
Try using Table.RowCount and Table.SelectRows in Power Query.
= Table.RowCount(Table.SelectRows(calendar, each [working days] =1))
Then you can multiply it easily.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You are looking for a CROSSFILTER, a cartesian product of unrelated tables.
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
53 | |
21 | |
12 | |
12 |