June 7, 2024
Hi,
I have a fact table containing appointments for clients and a dim table containing a list of clients with a 'total weekly target hours' column.
I want a table containing client name, total appointment hours from my fact table and the target hours from the dim table.
I am struggling to create a measure for the target hours, can you help?
Thanks, Ian.
p.s., I can't post to the members forum
Moderators
January 31, 2022
Moderators
January 31, 2022
Did something in Power Pivot. Loaded both tables to the DM with a relationship on the Customer ID. Two simple (tough explicit measures to sum appointment hours and target hours. Added a calculated column for the week number of the appointment, assuming that you will have more than one week of data in reality.
Should work the same in PowerBI. Is that what you had in mind?
Moderators
January 31, 2022
Great! That's a small mistake. Do it once and never again 🙂
You can always hide the customer id from the fact table so that it doesn't show in the fields to build your visuals with.
TIP: always hide the 'many' side (fact table) of the relationship so that you can't accidentally use it.
1 Guest(s)