Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Wrong Sub-totals

    Posted 22 days ago

    Hi,
    I am struggling to find the right measure for calculating the subtotal at the month level for the Weighted (WTD) stock cover in weeks.
    Example of row-wise calculation: (12%+27%)*7.6 = 3.0 of wtd stock cover in wks for Partner A.

    In the month total I want to sum up all these results at sub-category and regional level for each Partner to get the sum shown on extreme right. 

    Whats the best way to get that?



    ------------------------------
    Fatma A
    ------------------------------


  • 2.  RE: Wrong Sub-totals

    Bronze Contributor
    Posted 21 days ago
    Hi Fatma,

    To achieve this, use SUMX to iterate over the dates:

    SUMX ( VALUES ( Datetable[Dates] ), [WTD Stock Cover in wks] )

    ------------------------------
    Tomas
    ------------------------------



  • 3.  RE: Wrong Sub-totals

    Posted 21 days ago

    Hi,

    Thanks for the reply.

    This works for stock covers wks but not for wtd stock covers. still giving same result of 6.7.

    for wtd cover= CALCULATE([Days Covers]/7)*(CALCULATE([Wtd Forecast], ALL(Products[Partners]) ) )



    ------------------------------
    Fatma A
    ------------------------------