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.
I have a dataset with the following:
I want to represent average values over a date range that the Powerbi dashboard user can select with a slicer.
I am in directQuery mode on a Postgresql database.
Is it possible ?
id_sensor | measurement_date | data_value |
12024 | 02/06/2023 17:21 | 0.5 |
12024 | 22/05/2023 17:02 | 0.25 |
12024 | 23/05/2023 10:25 | 0.25 |
12024 | 01/06/2023 16:58 | 0.5 |
12024 | 15/05/2023 06:44 | 0 |
12024 | 15/05/2023 17:04 | 0.5 |
12024 | 16/05/2023 07:11 | 0.25 |
12024 | 17/05/2023 07:16 | 0.25 |
12024 | 19/05/2023 07:42 | 0 |
12024 | 19/05/2023 17:18 | 1.25 |
12024 | 20/05/2023 07:19 | 1 |
12024 | 10/06/2023 16:26 | 0.5 |
12024 | 11/06/2023 06:56 | 1.25 |
12024 | 12/06/2023 14:50 | 1.25 |
12946 | 22/05/2023 18:29 | 0.25 |
12946 | 23/05/2023 06:19 | 0.25 |
12946 | 03/06/2023 14:52 | 0.5 |
12946 | 24/05/2023 13:49 | 0.25 |
12946 | 05/06/2023 14:03 | 0.5 |
12946 | 25/05/2023 15:52 | 0.5 |
12946 | 06/06/2023 14:09 | 0.75 |
12946 | 27/05/2023 15:08 | 1 |
....
Solved! Go to Solution.
Hi, @sigtopo
You can try the following methods. This formula can be run in Direct query mode.
Measure =
AVERAGEX ( FILTER ( 'Table',
[measurement_date] >= MIN ( 'Table'[measurement_date] )
&& [measurement_date] <= MAX ( 'Table'[measurement_date] )
&& [id_sensor] = SELECTEDVALUE ( 'Table'[id_sensor] )
),
[data_value]
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It's perfect ! Thanks !
Hi, @sigtopo
You can try the following methods. This formula can be run in Direct query mode.
Measure =
AVERAGEX ( FILTER ( 'Table',
[measurement_date] >= MIN ( 'Table'[measurement_date] )
&& [measurement_date] <= MAX ( 'Table'[measurement_date] )
&& [id_sensor] = SELECTEDVALUE ( 'Table'[id_sensor] )
),
[data_value]
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
15 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
11 |