Forum Discussion
Cumulative Computers logged on
OK, now to try explain what I am trying to do ...
I have to report monthly on patch compliance for my organisation, we have 2500 desktop/laptops and I am constantly quizzed why we don't have 100% compliance across the organisation and I have tried a million times to explain that 1400 of the machines are laptops and over the course of a month any one of these machines can be disconnected from the network for 2-3 weeks or even longer which means trying to catch them in a 4 week period (depending on where in our 4 week rolling cycle and when reports are run) can be difficult. Add to this machines being replaced / lost / broken in 60 days you still don't see all 100% of machines but after 60 days we have sccm clean out this old data.
In powerbi I have a dashboard that shows our compliance very well but what I want to have is a chart showing the number of machines that have logged on today (normally 75% of the total machines) BUT i want to show the cumulative number of UNIQUE machines that have logged on going back 60 days - this should in theory manage to catch all the machines with each day adding more machines. Each day will have all previously logged on machines + the new machines for that day counting backwards to 60 days ago.
I have the data captured live from our SCCM environment for logon on times.
In PowerBi - the table with the logon info in is called
"Clientinfo"
and column is called
"Last_Logon_Timestamp0"
format is (UK Date format)
"30/10/2018 09:06:13"
I have the data exported into excel and have worked out the query to get what I want - I have created some fake data to demonstrate. The data is plotted on a line graph to show the number of computers logged on increasing as you go back x days.
What I am struggling with is translating this into PowerBi - any help would be greatly recieved + this may be useful to any others having the same issue with trying to explain there compliance numbers etc.
Excel - column E - "Decimal"
=COUNTIF($B$2:$B$60,">"&TODAY()-C2)/COUNTA($B$2:$B$60)
I have put 60 machines and gone back the 60 days but in reality there are 2500 machines.
Data
| Name | Last_Logon | Days | % | Decimal |
| Comp1 | 29/10/2018 10:00 | 1 | 42.37 | 0.423729 |
| Comp2 | 29/10/2018 10:00 | 2 | 49.15 | 0.491525 |
| Comp3 | 29/10/2018 10:00 | 3 | 66.10 | 0.661017 |
| Comp4 | 29/10/2018 10:00 | 4 | 72.88 | 0.728814 |
| Comp5 | 29/10/2018 10:00 | 5 | 74.58 | 0.745763 |
| Comp6 | 29/10/2018 10:00 | 6 | 74.58 | 0.745763 |
| Comp7 | 29/10/2018 10:00 | 7 | 74.58 | 0.745763 |
| Comp8 | 29/10/2018 10:00 | 8 | 74.58 | 0.745763 |
| Comp9 | 29/10/2018 10:00 | 9 | 74.58 | 0.745763 |
| Comp10 | 29/10/2018 10:00 | 10 | 76.27 | 0.762712 |
| Comp11 | 29/10/2018 10:00 | 11 | 76.27 | 0.762712 |
| Comp12 | 29/10/2018 10:00 | 12 | 76.27 | 0.762712 |
| Comp13 | 29/10/2018 10:00 | 13 | 76.27 | 0.762712 |
| Comp14 | 29/10/2018 10:00 | 14 | 76.27 | 0.762712 |
| Comp15 | 29/10/2018 10:00 | 15 | 76.27 | 0.762712 |
| Comp16 | 29/10/2018 10:00 | 16 | 76.27 | 0.762712 |
| Comp17 | 29/10/2018 10:00 | 17 | 76.27 | 0.762712 |
| Comp18 | 29/10/2018 10:00 | 18 | 76.27 | 0.762712 |
| Comp19 | 29/10/2018 10:00 | 19 | 76.27 | 0.762712 |
| Comp20 | 29/10/2018 10:00 | 20 | 76.27 | 0.762712 |
| Comp21 | 29/10/2018 10:00 | 21 | 76.27 | 0.762712 |
| Comp22 | 29/10/2018 10:00 | 22 | 76.27 | 0.762712 |
| Comp23 | 29/10/2018 10:00 | 23 | 76.27 | 0.762712 |
| Comp24 | 29/10/2018 10:00 | 24 | 76.27 | 0.762712 |
| Comp25 | 29/10/2018 10:00 | 25 | 76.27 | 0.762712 |
| Comp26 | 28/10/2018 11:00 | 26 | 76.27 | 0.762712 |
| Comp27 | 28/10/2018 11:00 | 27 | 76.27 | 0.762712 |
| Comp28 | 28/10/2018 11:00 | 28 | 76.27 | 0.762712 |
| Comp29 | 28/10/2018 11:00 | 29 | 76.27 | 0.762712 |
| Comp30 | 27/10/2018 11:00 | 30 | 76.27 | 0.762712 |
| Comp31 | 27/10/2018 11:00 | 31 | 76.27 | 0.762712 |
| Comp32 | 27/10/2018 11:00 | 32 | 76.27 | 0.762712 |
| Comp33 | 27/10/2018 11:00 | 33 | 76.27 | 0.762712 |
| Comp34 | 27/10/2018 11:00 | 34 | 76.27 | 0.762712 |
| Comp35 | 27/10/2018 11:00 | 35 | 76.27 | 0.762712 |
| Comp36 | 27/10/2018 11:00 | 36 | 76.27 | 0.762712 |
| Comp37 | 27/10/2018 11:00 | 37 | 76.27 | 0.762712 |
| Comp38 | 27/10/2018 11:00 | 38 | 76.27 | 0.762712 |
| Comp39 | 27/10/2018 11:00 | 39 | 76.27 | 0.762712 |
| Comp40 | 26/10/2018 12:00 | 40 | 76.27 | 0.762712 |
| Comp41 | 26/10/2018 12:00 | 41 | 76.27 | 0.762712 |
| Comp42 | 26/10/2018 12:00 | 42 | 76.27 | 0.762712 |
| Comp43 | 26/10/2018 12:00 | 43 | 76.27 | 0.762712 |
| Comp44 | 25/10/2018 13:00 | 44 | 76.27 | 0.762712 |
| Comp45 | 20/10/2018 14:00 | 45 | 76.27 | 0.762712 |
| Comp46 | 10/09/2018 15:00 | 46 | 76.27 | 0.762712 |
| Comp47 | 10/09/2018 15:00 | 47 | 76.27 | 0.762712 |
| Comp48 | 10/09/2018 15:00 | 48 | 76.27 | 0.762712 |
| Comp49 | 10/09/2018 15:00 | 49 | 76.27 | 0.762712 |
| Comp50 | 10/09/2018 15:00 | 50 | 86.44 | 0.864407 |
| Comp51 | 10/09/2018 15:00 | 51 | 86.44 | 0.864407 |
| Comp52 | 01/09/2018 16:00 | 52 | 86.44 | 0.864407 |
| Comp53 | 01/09/2018 16:00 | 53 | 86.44 | 0.864407 |
| Comp54 | 01/09/2018 16:00 | 54 | 86.44 | 0.864407 |
| Comp55 | 01/09/2018 16:00 | 55 | 86.44 | 0.864407 |
| Comp56 | 01/09/2018 16:00 | 56 | 86.44 | 0.864407 |
| Comp57 | 01/09/2018 16:00 | 57 | 86.44 | 0.864407 |
| Comp58 | 01/09/2018 16:00 | 58 | 86.44 | 0.864407 |
| Comp59 | 01/09/2018 16:00 | 59 | 100.00 | 1 |
graph - at top of page - graph is of columns C & D
I'm very new to PowerBi and am having issues working out how to do this on the fly (the data is refreshed from SCCM every couple of hours).
4 Replies
- Greg_DecklerCommunity Champion
Have you tried the Running Total Quick Measure?
- v-yuta-msftCommunity Support
Hi jmcgowan,
Similar case for your reference: https://community.powerbi.com/t5/Desktop/DAX-Function-for-COUNTIF-and-or-CALCULATE/td-p/66607
Regards,
Jimmy Tao
- v-yuta-msftCommunity Support
Hi jmcgowan,
Have you solved your issue? If you have, could you please kindly mark one answer to finish this thread?
Regards,
Jimmy Tao
- AnonymousNot applicable
Not as yet - I have asked someone I know to look at it - if I get a solution I will post it here.
The link and suggestion above may be good pointers but I really can't get my head around how to implement it so have asked someone else to take a look for me.
The data I have in the tables already is exported from SCCM exactly as I want it then it is simply a case of making it look the way I want.
As this is manipulating the data from within PowerBi, I am still at a loss, if anyone can break it down a little that may help.
The excel spreadsheet with the calculation I listed above work perfectly but is a pain to export and split out all the data each month, so I am using that for now until I can work out this method.
cheers