Skip to main content

Hi,  I'm new to Tableau. Thank you in advance.

 

In my Order Data there are multiple rows for Order based on delivery location codes, for each location code quantity can be different. That in this data order has minimum one or more rows due to delivery locations and quantity.

 

I need count of orders which has multiple rows.

 

In Screenshot I did this in Excel added rows count.

How to calculate count of orders with multiple delivery locations. 

5 respuestas
  1. 13 may 2021, 15:53

    @Sunil Pawar​ ​ 

    You can create an LOD:

    # Lines per Order:

    {FIXED [Order]:COUNT([Location ID])}

    Then you can sum the number or orders with lines>1

    #Number of Orders>1:

    IF [# Lines per Order]>1 THEN 1 END

    Take into account that in order to dimension filters affect fixed calculations these must be added to context. To do this, right clic on the filter in the filter shelf and select add to context.

     

    @Sunil Pawar​ ​ You can create an LOD:# Lines per Order:{FIXED [Order]:COUNT([Location ID])}Then you can sum the number or orders with lines>1#Number of Orders>1:IF [# Lines per Order]>1 THEN 1 ENDTakAttached you will find a workbook, with an example. 

     

    If this post assists in resolving the question, please "Upvote" it or "Select as Best" if it resolves the question. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.

     

    Regards,

     

    Diego

0/9000