Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Use Calculation in Matrix Total

Hi all,

 

I have a simple calculated column that is dividing two column by each other:

 

Conversion Rate = DIVIDE('Campaigns Data'[Conversions],'Campaigns Data'[Unique Pageviews])
 
 
I've put the results into a matrix and they're fine - the calculation is set to Sum, but it doesn't really matter as the data table has only a single row per day. However, the Total row is adding up all of the results of the rows - what I'm after though is for the total to be a sum of all the conversions divided by a sum of all the unique pageviews as per the Conversion Rate calculation. 
 
 
 
Can anyone suggest if this is doable?
 
TIA,
 
SamB 
  • Anonymous's avatar
    Anonymous
    7 years ago

    FYI for anyone reading this. I have solved this by creating three measures:

     

    Total uPVs = SUM('Data'[Unique Pageviews])
    
    Total Conversions = SUM('Data'[Conversions]
    
    Conversion Rate_Proper = DIVIDE ([Total Conversions],[Total uPVs])

     

    Conversion Rate_Proper then goes into the value field in the matrix.

     

    Works a charm.

     

    Sam

3 Replies

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Hi SamBerger ,

     

    Based on your description, it seems like there're three different columns in your table named 'conversions ', 'unique pageviews' and 'Conversion Rate calculation', right? Could you share more details about your raw data and requirement?

     

    Regards,

    Jimmy Tao

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Jimmy,

       

      Thanks for the reply. Yes, that is correct - see table below. This is the dataset in its entirety. 

       

      DateDay of Week NameUnique PageviewsWeek LabelDate SorterConversionsConversion Rate
      19/11/2018Monday31381.0Last Week1457614.6%
      20/11/2018Tuesday32044.0Last Week2478714.9%
      21/11/2018Wednesday30498.0Last Week3449114.7%
      22/11/2018Thursday29649.0Last Week4433214.6%
      23/11/2018Friday25553.0Last Week5370114.5%
      24/11/2018Saturday15765.0Last Week6242515.4%
      25/11/2018Sunday17179.0Last Week7263915.4%
      12/11/2018Monday32600.0Week Before1485514.9%
      13/11/2018Tuesday31677.0Week Before2468914.8%
      14/11/2018Wednesday29508.0Week Before3434314.7%
      15/11/2018Thursday28203.0Week Before4416714.8%
      16/11/2018Friday24955.0Week Before5368914.8%
      17/11/2018Saturday15794.0Week Before6235514.9%
      18/11/2018Sunday17322.0Week Before7260315.0%

       

      So in terms of the matrix, Day of Week Name is going in Rows, Week Label in Columns and Conversion Rate (calculated by dividing Converstions into Unique Pageviews) in Values.

       

      In terms of results, the Week Before 'Total' would be 14.83% ( Total Conversion for 'Week Before' = 26701 / Total Unique Pageviews for 'Week Before' = 180059).

       

      Let me know if you need any further info.

       

      Thanks,

       

      Sam

      • Anonymous's avatar
        Anonymous
        Not applicable

        FYI for anyone reading this. I have solved this by creating three measures:

         

        Total uPVs = SUM('Data'[Unique Pageviews])
        
        Total Conversions = SUM('Data'[Conversions]
        
        Conversion Rate_Proper = DIVIDE ([Total Conversions],[Total uPVs])

         

        Conversion Rate_Proper then goes into the value field in the matrix.

         

        Works a charm.

         

        Sam