Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to Calculate Daily Average with a Separate Working Days Table?

Hi,

 

I've tried a few measures myslef and from this forum to calculate daily average with specific working days per month. They all failed.

 

I have this separate working days table:

 

DateWorking Days
1/1/201822
2/1/201820
3/1/201822
4/1/201821
5/1/201822
6/1/201821
7/1/201821
8/1/201823
9/1/201819
10/1/201823
11/1/201820
12/1/201818
1/1/201922
2/1/201920
3/1/201921
4/1/201922
5/1/201922
6/1/201920
7/1/201922
8/1/201922
9/1/201920
10/1/201923
11/1/201919
12/1/201919
1/1/202022
2/1/202020
3/1/202022
4/1/202022
5/1/202020
6/1/202022
7/1/202022
8/1/202021
9/1/202021
10/1/202022
11/1/202019
12/1/202020

 

I have another table with volume, the simplfied version is:

 

Calendar monthCalendar YearCustomerRevenueVolume RPTDate
Jan2019Csutomer 158031/1/2019
Jan2019Csutomer 212789.07701/1/2019
Feb2019Csutomer 32089192/1/2019
Feb2019Csutomer 48799.02762/1/2019
Mar2019Csutomer 57724.5703/1/2019
Mar2019Csutomer 64468403/1/2019
Mar2019Csutomer 77941.07703/1/2019
Apr2019Csutomer 82491234/1/2019
May2019Csutomer 9397.0225/1/2019
Jun2019Csutomer 1023751.121816/1/2019
Jul2019Csutomer 111389137/1/2019
Jul2020Csutomer 1229572.061177/1/2020
Jul2020Csutomer 1342727/1/2020
Jul2020Csutomer 1440327/1/2020
Aug2020Csutomer 1541292.123778/1/2020
Aug2020Csutomer 163810.5431.58/1/2020
Aug2020Csutomer 171143.0198/1/2020
Aug2020Csutomer 183390.530.58/1/2020
Aug2020Csutomer 19181016.58/1/2020


*The two date columns are connected in table relationship.


How do I get a measure to calculate daily volume and revenue?

 

Thank you in advance for any help!

 

Regards, 

 

  • Hello Anonymous 

    These should get you there.

    Revenue Portion = SUMX ( Volume, DIVIDE ( Volume[Revenue] , RELATED ( Days[Working Days] ) ) )
    Volume Portion = SUMX ( Volume, DIVIDE ( Volume[Volume RPT] , RELATED ( Days[Working Days] ) ) )

    I have attached my sample file for you to take a look at.

     

    If this solves your issues please mark it as the solution. Kudos 👍 are nice too.

     

2 Replies

  • Hello Anonymous 

    These should get you there.

    Revenue Portion = SUMX ( Volume, DIVIDE ( Volume[Revenue] , RELATED ( Days[Working Days] ) ) )
    Volume Portion = SUMX ( Volume, DIVIDE ( Volume[Volume RPT] , RELATED ( Days[Working Days] ) ) )

    I have attached my sample file for you to take a look at.

     

    If this solves your issues please mark it as the solution. Kudos 👍 are nice too.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi