Forum Discussion

Cro-Magnon's avatar
Cro-Magnon
Regular Visitor
1 year ago
Solved

Monthly averages - Calculated column - Aggregation

Suppose I have the following table: Date Product STD 2025-02-05 XX 1 2025-02-05 XX 1 2025-02-06 XX 0 2025-02-08 XX 0 2025-02-10 YY 0 2025-03-02 XX 1 2025-03...
  • v-aatheeque's avatar
    v-aatheeque
    1 year ago

    Hi Cro-Magnon,

    To fix this, you can use an below measure that calculates the percentage correctly by summing up the values at the level you want.
    Dax Measure : 

    STD_Percentage_XX = 
    DIVIDE([TotalProducts_XX],
        [STD_Products_XX], 
        
        0
    )

     
    the expected output as below :


    This measure works with the aggregated totals instead of individual row context, providing the correct percentage of standard products.

    If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.

    If you continue to face issues, feel free to reach out to us for further assistance!