Forum Discussion

tnoflahc's avatar
tnoflahc
Frequent Visitor
9 years ago

Show table data over time

Hi all. I have a table that updates in a new worksheet every week. So, week 1 table data on a "week 1" sheet, updated table data for week 2 on a "week 2" sheet, and so on.

 

The table is arranged with headers "Sector" and "Orders," where "sector" would be either product lines or perhaps geographic regions, and "orders" are dollar amounts for that week.

 

Is there a way to show changes in the order amounts over time in Power BI using these tables?

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Sample data would help, but in theory absolutely. If this is pulled into a table such that you have something like:

     

    Week,Sector,Orders

    1,Sector1,40

    2,Sector1,50

     

    It should be a relatively simple matter to construct a measure or calculated column that would demonstrate this.

     

    For example, if you also had a table of weeks like:

     

    Week

    1

    2

    ...

     

    Then in that table you could create a custom column along the lines of:

     

    Change = CALCULATE(SUM(Table[Orders]),RELATED(Table)) - CALCULATE(SUM(Table[Orders]),FILTER(Table,[Week] = Table[Week]-1))

    Probably not 100% correct because I didn't test it but that's the general idea.