Forum Discussion

tyan's avatar
tyan
Icon for Helper II rankHelper II
4 years ago
Solved

How to display the correct precentage

Cancellation Value % should show higher the cancellation value with the higher % of cancellation %,  but I think it uses each brand total amount insteand of using total brand amount as my TOTAL.  

 

$341,032.64 should show the highest % amoung of these brands. 

 

 I did 

cancellation value: calculate(sum(database[order value],filter(database,database[analysis]= "cancel"))

 

total value : calculate(sum(databse[order value]))

 

cancellation value %:   dividie( cancellation value,  total value)

 

someone please help !

 

  • Hi,

    I am not sure of what you want but try this

    cancellation value = calculate(sum(database[order value]),database[analysis]= "cancel")

    total value = calculate(sum(databse[order value]),all(database[brand]))

    cancellation value % = divide([cancellation value],[total value])

    Hope this helps.

     

5 Replies

  • Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.

  • Hi,

    I am not sure of what you want but try this

    cancellation value = calculate(sum(database[order value]),database[analysis]= "cancel")

    total value = calculate(sum(databse[order value]),all(database[brand]))

    cancellation value % = divide([cancellation value],[total value])

    Hope this helps.

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tyan ,

     

    If your total is calculated only with analysis="cancel", you can modify the measure to

    Total value = CALCULATE(SUM('database'[order value]),FILTER(ALL(database),[analysis]="cancel"))

    The other measures remain unchanged.

     

    You can check more details from the attachment.

     

    Best Regards,

    Stephen Tao

     

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

    • tyan's avatar
      tyan
      Icon for Helper II rankHelper II

      Hi Stephen, thank you for answering me question. The % looks good which higher cancenllation value = higher cancellation%; however, the total %, I am not looking for 100% thos

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi tyan ,

         

        What do you want to show here in total?

         

        Best Regards,

        Stephen Tao

         

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