Skip to main content
Solved

Duplicate data when reading timeseries into Power BI

  • 20 October 2022
  • 1 reply
  • 60 views

Glen Accardo
Active

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"

 

Best answer by Carin Meems

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

View original
Did this topic help you find an answer to your question?

1 reply

  • Seasoned Practitioner
  • 223 replies
  • Answer
  • October 21, 2022

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


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings