Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

DAX HELP

I have order quantity and invoiced quantity.

In some cases, we will delete sales order, so the order quantity will be blank and invoiced quantity will be there.

And I want to show order quantity and invoiced quantity customer wise and item wise.

And I want to remove the quantity from the sum, if the sales order is deleted.

Please help on this. 

 

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    So if i understand correctly you want the sum of order quantity and the sum of invoiced quantity, but dont count the invoiced quantity if order quantity is empty?

    If this is the case you can make a measure something like this, could be a little off as i have no sample data:

    Measure = CALCULATE(SUM(InvoicedQuantity);OrderQuantity <> BLANK())


    for OrderQuantity you can just do 

    Measure = SUM(OrderQuantity) 

     
    If this is not what you need please consider reading this and give a bit more information:
    https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      In my case, Order quantity and invoiced quantity are from different table, and order is the common link between these two tables.

       

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

    Hi Anonymous 

     

    You might consider creating pbix file that will contain some sample data (remove the confidential info), upload the pbix to onedrive or dropbox and share the link to the file. Please do not forget to describe the expected results based on this sample data.

     

     

  • Good.

    Greetings to all.

    I have a problem with a productivity calculation matrix that basically visualizes how much a worker produces per hour worked/day/week. The measure of calculation per worker works perfectly but I do not know how to calculate the total productivity of all users. Basically I have the calculation in horizontal but not in vertical or the general total