Forum Discussion

cailingjie0405's avatar
cailingjie0405
Frequent Visitor
5 years ago
Solved

Problem with Cumulative %

Hi Community,

I am doing a Pareto analysis and I calculated the cumulative % using the following formula:

 

Cumulative % = var currentUSD= [SumUSD]
var totalspend = CALCULATE([SumUSD],ALLSELECTED(Product) return
CALCULATE(
[SumUSD] ,
FILTER(ALLSELECTED(Product), [SumUSD] >= currentUSD)
) / totalspend
 
It works good and it shows as (sorry for the ugly chart)

However, we I add in a new filed (quantity). The first value of the cumulative % becames blank. I am not sure why this happend. Can you please advice?

 

Thanks in Advance!

  • Hi cailingjie0405 ,

     

    Don't know your model, maybe you can try the following measure:

     

    Cumulative % = 
    CALCULATE(
        SUMX('Product', [SumUSD]) ,
        FILTER(
            ALLSELECTED('Product'[Product Names]), 
            [SumUSD] >= SUM('Product'[USD])
        )
    ) / SUMX( ALLSELECTED('Product'[Product Names]), [SumUSD] )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

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

     

4 Replies

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

    Hi cailingjie0405 ,

     

    Don't know your model, maybe you can try the following measure:

     

    Cumulative % = 
    CALCULATE(
        SUMX('Product', [SumUSD]) ,
        FILTER(
            ALLSELECTED('Product'[Product Names]), 
            [SumUSD] >= SUM('Product'[USD])
        )
    ) / SUMX( ALLSELECTED('Product'[Product Names]), [SumUSD] )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

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

     

  • Hi,

    Share the link from where i can download your PBI file.

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

    Hi cailingjie0405 ,

     

    Does your problem have been solved? If it is solved, please mark a reply which is helpful to you.

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

     

    Best Regards,
    Winniz