Forum Discussion
Reduce number of line chart points when using live dataset?
- 5 years ago
Hi, lehikk
I'm a little bit confused about your needs. Maybe you need a Measure like this?
Last sixty minutes =
VAR now =
NOW ()
VAR cur_year =
YEAR ( now )
VAR cur_mon =
MONTH ( now )
VAR cur_day =
DAY ( now )
VAR cur_min =
MINUTE ( now )
VAR select_date =
CALCULATE (
SELECTEDVALUE ( 'Table'[Date] ),
FILTER (
'Table',
YEAR ( 'Table'[Date] ) = cur_year
&& MONTH ( 'Table'[Date] ) = cur_mon
&& DAY ( 'Table'[Date] ) = cur_day
&& (
cur_min - MINUTE ( 'Table'[Date] ) <= 60
)
)
)
RETURN
select_date
Actually, from December 2020, Desktop allows change the connection mode with live datasets from live connection to Direct Query and releases some limitations with live datasets. You can try it.
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, lehikk
I'm a little bit confused about your needs. Maybe you need a Measure like this?
Last sixty minutes =
VAR now =
NOW ()
VAR cur_year =
YEAR ( now )
VAR cur_mon =
MONTH ( now )
VAR cur_day =
DAY ( now )
VAR cur_min =
MINUTE ( now )
VAR select_date =
CALCULATE (
SELECTEDVALUE ( 'Table'[Date] ),
FILTER (
'Table',
YEAR ( 'Table'[Date] ) = cur_year
&& MONTH ( 'Table'[Date] ) = cur_mon
&& DAY ( 'Table'[Date] ) = cur_day
&& (
cur_min - MINUTE ( 'Table'[Date] ) <= 60
)
)
)
RETURN
select_date
Actually, from December 2020, Desktop allows change the connection mode with live datasets from live connection to Direct Query and releases some limitations with live datasets. You can try it.
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sorry it took a bit long to get back to the topic. To clarify, let's put it this way:
I have live dataset where a new value is added every minute. I want to show data for the last week which equals arount 10000 values (60*24*7). The problem is that such number of points is an overkill as I would need to see only the newest value and hourly average values for the last week. So basically I'm asking, is it possible to create aggregates in such live data scenario.
(the example is oversimplified and in real life the would be at least 60000 - 100000) values for the given timeframe, which tends to be quite heavy when viewed as a Line Chart in browser inside Power BI Service, especially when hovering over the chart)