Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Wrong Table Total

Hi all,

 

I am having trouble with by table's total. Now I don't even want the total but I can't seem to get the right solution. So if some one has another solution please feel free to throw it in here. 

 
 
 

The table:

 

Now as you can see, there is various cultivar's with harvest stat's. On the end there is a column named Ratio. This is the ratio for the Total Harvest per Amount Plants(not on table). Now, the individual row's Ratio is correct, but the total at the bottom is completely wrong. If it is a simple Total it should come out at 5.2. It is also not an average. I really don't know how that 0.79 is calculated. 

 

My Measure for Ratio is:

 

Ratio = 
    Divide(
        Sum('tunnels database harvest',[Total_incMedToL]),
        Sum('tunnels database planting',[amount_plants])
 )

 

 

Now what i would like the Total to show is the ratio for the total harvest (across all cultivars) divided by the total plants(across all cultivars). Or at least the correct total (although this is useless to me and will just ease my OCD)

 

I will give more info if you need it.

 

thanks 

  • Anonymous ,

     

    Modify the measure:

    Ratio =
    DIVIDE (
        SUMX (
            'tunnels database harvest',
            ( 'tunnels database harvest'[total Med] / 5 ) + 'tunnels database harvest'[total Cucumbers]
        ),
        SUMX ( 'tunnels database planting', [amount_plants] )
    )
    

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak 

      This is just to convert [total Med] to a comparable value tot the other sizes

      Total_incMedToL = ('tunnels database harvest'[total Med] / 5) +'tunnels database harvest'[total Cucumbers]

       

      And amount plants is not a caluclated value but rather a value in a date table. Thus amount plants is the coloumn name of the table.

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

        Anonymous ,

         

        Modify the measure:

        Ratio =
        DIVIDE (
            SUMX (
                'tunnels database harvest',
                ( 'tunnels database harvest'[total Med] / 5 ) + 'tunnels database harvest'[total Cucumbers]
            ),
            SUMX ( 'tunnels database planting', [amount_plants] )
        )
        

         

        Community Support Team _ Jimmy Tao

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.