Forum Discussion

tomperro's avatar
tomperro
Helper V
3 years ago
Solved

Table Visualization Totals Help

Having some difficulty figuring out how to get the total (in red) that I need to show. I am getting 3159 not 926.

3159 is the Total This divided by Total That - should be 3,159 divided by 13 = 926.

 

CategoryTotal This     Total That     

This Per That

(This / That)     

Category 1     12,418     5     2,484     
Category 2     2,154     1     2,154     
Category 3      6,207     0     0     
Category 4     11,159     2     5,580     
Category 5     9,130     5     1,826     
Totals      41,068     13     

3,159*

* Should be the total of This Per That column (12,044) divided by total of Total That (13)

(12,044 / 13 = 926)

 

Current Calculations

Total This = CALCULATE(SUM(MyTable[This]),DATESYTD(ENDOFYEAR(OTI_MORV_Data[Month],"12/31")))
Total That = CALCULATE(SUM(MyTable[That]),DATESYTD(ENDOFYEAR(OTI_MORV_Data[Month],"12/31")))
This Per That = CALCULATE(DIVIDE([Total This],[Total That],0),DATESYTD(ENDOFYEAR(MyTable[Month],"12/31")))
  •  

     

     

    This per That = 
      IF(
        HASONEVALUE('Table'[Category]),
        DIVIDE(
          SUM('Table'[Total This]),
          SUM('Table'[Total That]),
          0 
          ),
        DIVIDE(
          SUMX('Table', DIVIDE('Table'[Total This], 'Table'[Total That], 0)),
          SUMX('Table', 'Table'[Total That]),
          0 
          ) 
        )

     

     

     

10 Replies