Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hey!!
How're you doing?
I'm creating a BI to analise some stuff, but i'm having some issues manipulating time values.
The data was gettered from mongoDB in a connection with R and, with that all the data came in one, i mean, all de status and its updates came with it's respective time, so i can't calculate between columns for, as all the datatimes lies on the same column, and the power bi won't let me use simple "Datediff" ou calculate just with the column, when it asks for a previews operation like max('status'[datetime]), what i think would just give me the last data.
My objective is to adquire the time beetween a change of status for each id on the table, or at least it's maximum and it's mean values.
Here's a exemple of what i'm talking about:
Id | Status | Datetime |
5ff34563ebaa650023799723 | ENTER_QUEUE | 04-01-2021 16:42:11 |
5ff34566ebaa650023799725 | IN_ATTEND | 04-01-2021 16:42:14 |
5ff3457bebaa65002379972a | FINISH_ATTEND | 04-01-2021 16:42:36 |
5ff3456eebaa650023799727 | ENTER_QUEUE | 04-01-2021 16:42:23 |
I've tried to do many thing with that but it's getting weird to do, like i did a table for each status and then merged it's times to compare, and it's the closest I got to what I need.
Sorry if it's too basic or not a proper topic to discuss, but i'm kind of new on power bi.
@Anonymous See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586.
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
10 |