Forum Discussion

nadian's avatar
nadian
Frequent Visitor
10 years ago

Dynamic columns refresh issue

Hi,

I'm having a pivot table as my source table (using SQL connection), the columns are months.

When I'm refreshing the dashboard I'm expect to get new month (new column), I'm getting it from the query but the dashboard doesn't add it automatically to the chart, I have to select it in order to make it visible.
Is there any solution to fully automate this process?

 

Thanks!

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Sounds like you should submit this as an Idea although I'm not sure how that would work exactly in terms of how you would tell a visualization to display new columns automatically. That seems like that would be a very small percentage of usage.

     

    Any chance you could unpivot the month columns and then you could do what you want automatically via grouping, etc.?

    • nadian's avatar
      nadian
      Frequent Visitor

      I tried to unpivot the month and make the pivot visualisation within the Power Bi Desktop but it didn't success.

      the table that I have looks like:

      Type   Jan   Feb   March

      a          1        2       10

      b          15      2       1

      c          12      1       6

       

      but, in the next refresh I would have:

      Type   Feb   March   Apr

      a          2        10       4

      b          2        1         0

      c          1         6        3

       

      I have to select the new column (Apr) in order to see it in my dashboard.

      Actually I want the dashboard always to show me all existing columns from my query (it will be always 3 last month).

      I can unpivot the table to look like:

      Month    a    b    c

      Jan        1    15   12

      Feb        2    2     1

      March    10  1      6

       

      But is there any way to pivot it using the Power Bi Desktop?

       

      Thanks for your help.

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Yes, sorry, that was what I was suggeting, to unpivot it in Desktop. Point a query to your data and edit the query. Choose your "Type" column and then "Transform | Unpivot columns | Unpivot Other Columns", you should get a table like:

         

        Type,Attribute,Value

        a,Jan,1

        a,Feb,2

        a,March,10

        b,Jan,15

         

        etc.