Forum Discussion
Running count hourly from table with no timestamp
Yes, current updated count with previuos count as well.
let say user runs the report at 9AM, output should be
9AM 3
at 10 AM when report is run, out pout should be
9AM 3
10AM 7
at 11AM, output should be
9AM 3
10AM 7
11AM 8
Thanks in advance
Your problem is that power bi cannot easily write data, so recording the times your reports are run is tricky.
You could always run the reports at fixed hours of the day.... in which case your reports would be counting the records betwen different sets of predetermined hours.
Or you could take an approach like the one explained here https://www.youtube.com/watch?v=UFD5S4Peqc4 where a dax measure actually can write back to a sql database and record the time when a report is run...... for this to work you would have to refresh your data in power bi every time you wanted to re-run the report, so the report measures would have access to the record that tells the last time the report was run.
- Raaz6 years ago
Helper II
Thanks for your help!!
I dont want to retrieve the time of my report run and writing it to sql.
I just want to run the report at fixed hour of the day and then counting the records between different sets of hours.
like I am able to retrieve the data like this
Time countof orders
9AM 69
at 10 AM
9AM 60
10AM 60
at 11AM
9AM 57
10AM 57
11AM 57
(Report will be run at fixed hours, after every one hour)
My problem is , I am unable to retain the count for the prvious hours
I want output like this
9AM 69
10AM 60
11AM 57
is this possible ?
Please note my table doent have timestamp. I created a new calendar table with date and time and joined this date coulumn with date column of my table
Please help...
- kentyler6 years ago
Solution Sage
The more I think about this, the more I think that you should really go back and arrange to get a timestamp added to your data. If someone wants to do a report BY HOUR, then its only reasonable that they need to provide a timestamp.