Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I want to get the latest value for a specific time and date, but when I apply two filters to my formula, it results in BLANK.
I appreciate any tips on that:) .
This is my calculation:
This is my fact table:
| sensor_id | time_id | date_id | Sensor value |
| 1 | 49 | 25 | 11100 |
| 1 | 49 | 26 | 1532 |
| 1 | 51 | 27 | 48877 |
Hi @Anonymous
please try
Sensor Value latest =
VAR T1 =
SUMMARIZE (
fact_sensordata,
'fact_sensordata'[date_id],
'fact_sensordata'[time_id],
"@SensorValue", [Sensor Value]
)
VAR T2 =
TOPN (
1,
T1,
'fact_sensordata'[date_id], DESC,
'fact_sensordata'[time_id], DESC
)
RETURN
MAXX ( T2, [@SensorValue] )
Hi,
I am not sure how your full dataset looks like, but please check the below picture and the attached pbix file.
Hello there @Anonymous ! Not sure if this is what you want but try this:
Sensor Value latest =
CALCULATE (
AVERAGE( fact_sensordata[Sensor Value] ),
ALL ( 'fact_sensordata'[date_id], 'fact_sensordata'[time_id] ),
'fact_sensordata'[date_id] = MAX ( 'fact_sensordata'[date_id] )
&& 'fact_sensordata'[time_id] = MAX ( 'fact_sensordata'[time_id] )
)
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |