Forum Discussion

Stijn_de_Stp's avatar
Stijn_de_Stp
Regular Visitor
5 years ago
Solved

Measure percentage

Hi there, 

 

I've a column in my data:

- "InvoicedQuantity" is a number how many products are invoiced. If 1 product is returned it will also have value "1" but the next column will say "return".

- "Returned" wich rows are eather empty or it sais "return" when it's returned. 

- ConcernCode

- Month

- ArticleDescription

 

What I want to do is create a measure that will calculate the percentage between the number InvoicedQuantity where column returned is empty and the number InvoicedQuantity where column returned has the value "return". With that measure I want to create multiple graphs with that percentage based on concerncode, month or articledescription. 

 

How can I do this? 

  • Stijn_de_Stp , try a measure like

     

    divide(calculate(sum(table[InvoicedQuantity]), filter(Table, isblank(Table[returned]))),calculate(sum(table[InvoicedQuantity]), filter(Table, Table[returned] "return"))
    )

     

    or

     

     

    divide(calculate(sum(table[InvoicedQuantity]), filter(Table, Table[returned] "return")),calculate(sum(table[InvoicedQuantity]), filter(Table, isblank(Table[returned])))
    )

1 Reply

  • Stijn_de_Stp , try a measure like

     

    divide(calculate(sum(table[InvoicedQuantity]), filter(Table, isblank(Table[returned]))),calculate(sum(table[InvoicedQuantity]), filter(Table, Table[returned] "return"))
    )

     

    or

     

     

    divide(calculate(sum(table[InvoicedQuantity]), filter(Table, Table[returned] "return")),calculate(sum(table[InvoicedQuantity]), filter(Table, isblank(Table[returned])))
    )