Forum Discussion

axel_BI's avatar
axel_BI
Icon for Helper I rankHelper I
6 years ago
Solved

Pivoting Data with a measure

Hi,

my data is presenting me the sales per article per day per location. Like this.

Location|Date|Article_Nr|Sales

100005.08.2019100                                                      41,92 €
100005.08.2019200                                                              2,76 €
100005.08.2019300                                                              5,51 €
200005.08.2019100                                                            10,00 €
200005.08.2019300                                                              9,25 €
300006.08.2019100                                                            28,22 €
300006.08.2019200                                                          111,59 €
100006.08.2019100                                                            56,45 €

 

There are multiple locations and multiple articles per day. But not each locations will appear each day. And not every article will be sold in every day.

 

I need a way to Sum up data per Day per location.

I also need to count the days with sales for each location.

 

My goal is, to achieve average Sales per Day in total, aswell as per location.

I only get a general Average of Sales per Day, which doesnt consider different day-count per location.

 

Basically distinctcount location for distinct date.

 

Thx

  • You can use summarize:

     

    Summarize(Table;

    Table[Location];
    Table[Date];

    "Sum";Sum(Sales);
    "AVG";average(Sales))

     

2 Replies

  • Piotraq's avatar
    Piotraq
    Frequent Visitor

    You can use summarize:

     

    Summarize(Table;

    Table[Location];
    Table[Date];

    "Sum";Sum(Sales);
    "AVG";average(Sales))

     

    • axel_BI's avatar
      axel_BI
      Icon for Helper I rankHelper I

      Thank You,

       

      the pivot-table works just fine