Forum Discussion
Count and Conditional formatting by cell values
- 6 years ago
Anonymous
Hi again,
I apologise upfront since I hadn't considered the impact of 0 values, except for the visual you requested to show the count of names with 0 in any week. And of course, it also has an impact (potentially) in the monthly calculations. A big oversight of mine.
I have therefore re-worked through most of the measures to include names with 0 bookings in the overall calculations, including the count of those below the expected target (I have highlighted them in the tables). I'm afraid you will have to labour through the changes to adapt them to your exact model. Also please check out the filters applied to each visual in the filter pane.
There is one imortant point about the calculations. The model presently only considers 0 values if the value in the table is an actual 0. If there is no data present for a particular week, it does not compute that particluar User ID.
So based on the sample data there are 3 Users with 0 values included.
On the other hand, Richard ID 10 only appears in week 1 2018 (there are no values in 2017. Therefore there no records or listings for this user prior to 2018 Week 1).
In effect, the interpretation is that if there is no value, that user wasn't operating. IF that user was operating, we would expect at least a 0 as a value. Does that make sense?
I do have another version which will compute a 0 value for all IDs when there are no records, but this would deliver data potentially for IDs who have not even started operating. The ideal situation would of course be to have an operating start/end week/year for each ID (HR table) which we can then use to filter appropriately. For the time being, I've assumed that if there is no data for a given User ID, that user was not operating neither bookings nor target).
If you would like the version which computes all User IDs in all periods, do let me know and i'll post it for you.
The easiest way to control this phenomenom is if there are fields in the HR Table which establish an activity start or end year/week. These time frames can then be used to filter the data accordingly. Just bear this in mind.
Anyway, here are some resulting screenshots:
And here is the link to the file:
Thanks Paul once again for your swift reply. Seems all working, except my Sum Monthly Target hours column which is giving wrong results (attached), all the values are coming same. I checked the relationship, they seem okay (attached below). Don't know what went wrong.
What I'm doing is replicating your model with my Org data. Since the time tracking data is connected with Power BI real-time, so can't tweak, Two other files imported into PBI - HRData and Country Hour. I'm currently focusing on metrics by Name and Country, not by ProjectCode and Customer(which in my CDM is BookingKey & Summary). DateTable is there, not currently using, instead, I'm using the Booking hours and Booking month, Week from my HoursPax table.
Don't know where I'm going wrong?
Anonymous
Can you please post the [Sum Monthly Target hours] measure?
Thanks,
Paul