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.
Hi Team,
Need help in achieving the below results.
The source data has value based on timestamp and need to find the min value of hour of time from the dataset.
Source:
Source:
TIME VALUE
11/19/2020 15:31 167.79
11/19/2020 15:31 168.01
11/19/2020 15:21 167.7
11/19/2020 15:11 167.7
11/19/2020 15:11 167.7
11/19/2020 15:01 167.92
11/19/2020 15:01 167.7
11/19/2020 14:51 167.92
11/19/2020 14:51 167.7
11/19/2020 14:41 167.92
11/19/2020 14:41 167.7
11/19/2020 14:31 167.91
11/19/2020 14:31 167.7
11/19/2020 14:21 167.91
11/19/2020 14:20 167.7
11/19/2020 14:10 167.7
11/19/2020 14:01 167.79
11/19/2020 14:00 168.01
11/19/2020 13:50 168.01
11/19/2020 13:40 167.91
11/19/2020 13:40 167.7
11/19/2020 13:30 167.7
11/19/2020 13:30 167.7
11/19/2020 13:20 168.01
11/19/2020 13:20 168.01
11/19/2020 13:10 168.01
11/19/2020 13:00 168.01
Output:
11/19/2020 15:00 167.7
11/19/2020 14:00 168.01
11/19/2020 13:00 168.01
Thanks ,
Raj
Solved! Go to Solution.
Hi @Anonymous ,
Based on your description, you can do some steps as follows.
_hour = HOUR([TIME])
2. Create a measure.
calculated_value =
var x1=CALCULATE(MIN('Case2_2'[TIME]),ALLEXCEPT(Case2_2,Case2_2[_hour]))
return
CALCULATE(MIN('Case2_2'[VALUE]),FILTER(ALL('Case2_2'),'Case2_2'[TIME]=x1))
3. Create a table visual.
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Based on your description, you can do some steps as follows.
_hour = HOUR([TIME])
2. Create a measure.
calculated_value =
var x1=CALCULATE(MIN('Case2_2'[TIME]),ALLEXCEPT(Case2_2,Case2_2[_hour]))
return
CALCULATE(MIN('Case2_2'[VALUE]),FILTER(ALL('Case2_2'),'Case2_2'[TIME]=x1))
3. Create a table visual.
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Create a column like this as suggested in last update
TIME new = [TIME].date + time(hour([TIME],0,0)
And then use this in visual with measure given below
firstnonblankvalue(Table[TIME], max(Table[Value]))
As i am using the direct query , the solution above is showing error.
You should be able to get your result as follows
- in the query editor, split your datetime column at the space and convert to date and time
- add a column by selecting your time column and in the Time pull down choose Hour
- load the table
- make a table visual with the Date column and the new hour column
- also add the Value column and choose min as the aggregation (or write a measure with MIN() )
Note: if you table is already loaded, you could also do the same with DAX columns, but I would do it in query.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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 |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |