Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have a requirement to find the sum of values in the forcasted next 4 hours. Here's how the sample data looks like
Date | Hour | Values |
26/4/2022 | 22:00 | 20 |
27/4/2022 | 0:00 | 30 |
26/4/2022 | 23:00 | 10 |
26/4/2022 | 21:00 | 2 |
27/4/2022 | 1:00 | 50 |
27/4/2022 | 2:00 | 70 |
I need to sum the values from 21:00 of 26th april to 00:00 of 27th april. Can someone help me with the measure?
Thank you,
AV
Solved! Go to Solution.
@AV_04 , if hour is in time format , create a date time field
Dateime = [Date] +[time]
A new measure =
calculate(sum(Table[Value]), filter(Table, Table[DateTime] >= now() && Table[DateTime] <= now() +time(4,0,0) ) )
In place of now, you can also use selected date and time too
Thank you, I made some twerks to the above measure and was able to get my requirement. Thank you 🙂
@AV_04 , if hour is in time format , create a date time field
Dateime = [Date] +[time]
A new measure =
calculate(sum(Table[Value]), filter(Table, Table[DateTime] >= now() && Table[DateTime] <= now() +time(4,0,0) ) )
In place of now, you can also use selected date and time too
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |