Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Everyone,
so I have these time stamps -
Start Time | End Time |
01/01/2022 10:00 AM
| 01/01/2022 10:30AM |
01/01/2022 11:30 AM | 01/01/2022 12:00PM |
I want to generate the time stamp in between these two time stamps.
could you please guide me
It cannot be a measure.
desired output :
Start Time | End Time | |
01/01/2022 10:00 AM | 01/01/2022 10:30AM | |
01/01/2022 10:30 AM | 01/01/2022 11:30AM | |
01/01/2022 11:30 AM | 01/01/2022 12:00PM |
Thanks in advance 🙂 🙂
Solved! Go to Solution.
Hi, @hrishi
My mistake, I just found out that I added the function "SAMPLE" to limit the result to 3 lines.(I added the sample function just to facilitate the sorting of Column ‘Start Time’)
Please modify my original formula as follows:
New Table =
UNION (
SELECTCOLUMNS ( 'Table', "Start Time", 'Table'[Start Time] ),
SELECTCOLUMNS ( 'Table', "Start Time", 'Table'[End Time] )
)
Hope this could work for you.
Best Regards,
Community Support Team _ Eason
I am trying to create a simulation in power BI.
Hi, @hrishi
Try formuals as below:
Add a new calculated Table:
New Table =
SAMPLE (
3,
UNION (
SELECTCOLUMNS ( 'Table', "Start Time", 'Table'[Start Time] ),
SELECTCOLUMNS ( 'Table', "Start Time", 'Table'[End Time] )
),
[Start Time], ASC
)
Add a new calculated column:
End Time =
CALCULATE (
MIN ( 'New Table'[Start Time] ),
FILTER (
'New Table',
'New Table'[Start Time] > EARLIER ( 'New Table'[Start Time] )
)
)
Please check my sample file for more details.
Best Regards,
Community Support Team _ Eason
You are close to the solution however, we are missing the first time duration ie. 1/1/2022 10:00 AM - 1/1/2022 10:30 AM. and also the next time row 1/1/2022 10:30 AM - 1/1/20222 11:30 AM
Hi, @hrishi
My mistake, I just found out that I added the function "SAMPLE" to limit the result to 3 lines.(I added the sample function just to facilitate the sorting of Column ‘Start Time’)
Please modify my original formula as follows:
New Table =
UNION (
SELECTCOLUMNS ( 'Table', "Start Time", 'Table'[Start Time] ),
SELECTCOLUMNS ( 'Table', "Start Time", 'Table'[End Time] )
)
Hope this could work for you.
Best Regards,
Community Support Team _ Eason
You are awesome 🙂 🙂
Hi, @hrishi
I am not sure what you're trying to accomplish,
You want duration between two datetimes or you have let's say 1/1/2022 10:00 AM and then you have 1/1/2022 12:30 and you want to generate timestamp in between, each after let's say 30 minutes?
So the outcome would be:
1/1/2022 10:30 AM
1/1/2022 11:00 AM
1/1/2022 11:30 AM
I have update the post.
Hopefully it helps.
Thank you!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |