Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Grand Total with Different Calculation

Hi Community,

I have a small requirement regarding having different calculation for each line and the grand total. Please find the link for this file here. For the Grand Total of Labor Run Rate, I want to sum all Labor Run Rate for each project instead of using the current calculation. I appreciate for any help!

  • Anonymous

     

    Hi, try with this:

    Labor Run Rate =
    IF (
        HASONEVALUE ( test[Project Name] ),
        [Avg Month Labor]
            * ( MONTH ( MAX ( test[ECD] ) ) - MONTH ( NOW () ) ),
        SUMX (
            SUMMARIZE (
                test,
                test[Project Name],
                "LR", [Avg Month Labor]
                    * ( MONTH ( MAX ( test[ECD] ) ) - MONTH ( NOW () ) )
            ),
            [LR]
        )
    )

    Regards

     

    Victor

3 Replies

  • Vvelarde's avatar
    Vvelarde
    Community Champion

    Anonymous

     

    Hi, try with this:

    Labor Run Rate =
    IF (
        HASONEVALUE ( test[Project Name] ),
        [Avg Month Labor]
            * ( MONTH ( MAX ( test[ECD] ) ) - MONTH ( NOW () ) ),
        SUMX (
            SUMMARIZE (
                test,
                test[Project Name],
                "LR", [Avg Month Labor]
                    * ( MONTH ( MAX ( test[ECD] ) ) - MONTH ( NOW () ) )
            ),
            [LR]
        )
    )

    Regards

     

    Victor

    • Anonymous's avatar
      Anonymous
      Not applicable

      Vvelarde,

      Thank you so much for your help! :smileyhappy:

    • Anonymous's avatar
      Anonymous
      Not applicable

      How can you make this work when adding slicers from dimension tables? Let's say a date slicer. The total is not showing.