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.
I hope you guys can help me with this measure, since iam not a PowerBi god :).
What im trying to do is show the latest temperature by location so i can use the latest temperature value in power bi visuals.
Here is an exampe of my sql table: temperature_events
timestamp temperature locatie
26-8-2019 12:23:21 19.2 Hall
26-8-2019 12:21:47 19.9 Room 1
26-8-2019 12:19:41 20.1 Hall
26-8-2019 12:16:22 21.1 Room 2
26-8-2019 12:15:12 19.0 Room 1
26-8-2019 12:12:10 22.9 Room 2
I tried the following measure, but i get # the expression refers to multible columns. Multible columns cannot be converted to scalar value.
Solved! Go to Solution.
Hi @slendin
You can place Table1[locatie] in the visual and then:
Measure = VAR Latest_ = CALCULATE ( MAX ( Table1[timestamp] ) ) VAR LatestTemp_ = CALCULATE ( DISTINCT ( Table1[temperature] ), Table1[timestamp] = Latest_ ) RETURN LatestTemp_
Please mark the question solved when we get to the solution and consider kudoing if posts are helpful.
Cheers
Hi @slendin
You can place Table1[locatie] in the visual and then:
Measure = VAR Latest_ = CALCULATE ( MAX ( Table1[timestamp] ) ) VAR LatestTemp_ = CALCULATE ( DISTINCT ( Table1[temperature] ), Table1[timestamp] = Latest_ ) RETURN LatestTemp_
Please mark the question solved when we get to the solution and consider kudoing if posts are helpful.
Cheers
Awesome, worked like a charm! Thanks!
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |