Forum Discussion
Using Measures to calculate a column
By the way, the easiest way to do what you want is to have a bridge table that would join Mitarbeiter with all the individual dates when they were absent from work. Then, once you have it, it's dead easy to calculate for any period of time (say, day) how many of them were absent. How? Well, you'd connect your Dates to the bridge table on one field and the Mitarbeiter dimension (you have such a dimension, right?) on another and after selecting a date from Dates you'd just DISTINCTCOUNT the number of Mitarbeiter in the bridge table. Easy enough. Can't get any easier than that.
Hi Daxer,
sry for my late response, but I am only able to work on this topic once in a while. And a big thank you for your replies to my topic, I learned a lot out of them!
So yes, I do have a proper date table (no gaps, unique values), a Budget table as dimension table (Each employee in a different row with some further information) and a fact table with the vacation dates. My problem is that my vacation table does only provide a period defined by start, duration and end. So there are no individual absent dates which I could connect to my Employee table.
I have 2 questions:
How do I create a table with all individual absent dates for each employee?
How can I create a measure returning true or false whether or not the conditions are met? Should I use the SWITCH or IF function? Could you provide an example?
Thanks in advance - Regards
KimStahl94