Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Display only most recent data in table from push dataset

Hello,

I have a simple dataset as follow:
[String] ProductName
[Integer] Stock
[DateTime] Updated

 

The stocks are pushed at regular intervals for ALL the products.

I'd like to display only the last readings per product name, tried to use Top N without any success, Power BI seems to consider the 3 columns as identifer, so if I have 2 set of row posted as follow:
[ {ProductName: 'Table', Stock: 3, Updated: Date.now() } ]

 

and 5 minutes later the stock changed: 
[ {ProductName: 'Table', Stock: 1, Updated: Date.now() } ]

The report's table, even if I filter ProductName with Top 1 latest Updated, contains 2 rows for the record Table, one with Stock to 3 and one with Stock to 1. It seems Power BI Table considers the 2 columns as the index and thus the 2 records are passing the Top 1 filter anyway... 

Am I missing something here ?
Any help is apreciated.

5 Replies

  • v-evelk's avatar
    v-evelk
    Microsoft Employee

    Hello,

     

    Could you provide some screens to better understand your issue?

     

    Kind Regards,

     

    Evgenii Elkin,
    Software Engineer
    Microsoft Power BI Custom Visuals
    [email protected]

    • Anonymous's avatar
      Anonymous
      Not applicable

      thanks for your reply.
      here is the result I get:
      click to view image

      As you can see the 2 first rows are the same product, the stock was updated at different time, yet I see one row per unique {Product Name, Stock}.

      • v-evelk's avatar
        v-evelk
        Microsoft Employee

        Hi,

         

        Try the following

         

         

        Kind Regards,

         

        Evgenii Elkin,
        Software Engineer
        Microsoft Power BI Custom Visuals
        [email protected]