Solved

Duplicate data when reading timeseries into Power BI

  • 20 October 2022
  • 1 reply
  • 53 views

I have found a problem reading timeseries from Cognite with Power BI. The first bit of Power Query has a filter to limit the timeseries retrieved to just the ones I want. The second one is the same, but does not have the filter. What I have found is that adding the filter causes duplicate rows in the table. Once the timeseries rows are duplicated, the timeseries aggregation values are also duplicated. I know that the first query is not the most performant option, but it should still have the correct answer.

let
Source = Cognite.Contents( #"cogniteContentsParameters", #"cdfEnvironment"),
Timeseries_table = Source{[Name="Timeseries",Signature="table"]}[Data],
#"Filtered Rows" = Table.SelectRows(Timeseries_table, each ([IsString] = false)),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"MetaData", "SecurityCategories", "IsStep", "DataSetId", "CreatedTime", "LastUpdatedTime", "Asset", "Latest", "DataPoints", "StringPoints", "Aggregate"}),
#"Filtered Rows1" = Table.SelectRows(#"Removed Columns", each ([Name] = "oil-production-rate" or [Name] = "gas-production-rate" or [Name] = "water-production-rate"))
in
#"Filtered Rows1"
let
Source = Cognite.Contents( #"cogniteContentsParameters", #"cdfEnvironment"),
Timeseries_table = Source{[Name="Timeseries",Signature="table"]}[Data],
#"Filtered Rows" = Table.SelectRows(Timeseries_table, each ([IsString] = false)),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"MetaData", "SecurityCategories", "IsStep", "DataSetId", "CreatedTime", "LastUpdatedTime", "Asset", "Latest", "DataPoints", "StringPoints", "Aggregate"})
in
#"Removed Columns"

 

icon

Best answer by Carin Meems 21 October 2022, 11:52

View original

1 reply

Userlevel 3

Hi Glen,

 

We’ve tried to reproduce the problem you’re facing, but are currently unable to do so. We’d like to dig a little further in the issue, so we’ve created a Support ticket for this. We’ll be following up with you in that ticket. 

 

Have a nice day!

Carin

Reply