Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi
Here is my order table;
Order No | SO Lines | Shipping Condition |
10001 | 10 | Ship as available |
10001 | 20 | Ship as available |
12002 | 10 | Ship complete |
12002 | 20 | Ship complete |
13001 | 10 | Ship as available |
13001 | 20 | Ship as available |
13001 | 30 | Ship as available |
14001 | 10 | Ship as available |
If the shipping condition is 'Ship as available' then each of the order lines is treated separately. While if the order has the shipping condition as 'Ship complete' then the order is treated as 1 and all order lines need to ship together. This means in the above table I have 7 order lines.
I need assistance with the measures;
1. that counts the number of order lines based on shipping conditions, and
2. the other that just gives me the sum total of the count of order lines
Thanks and Regards
Solved! Go to Solution.
Hi,
Please try the below measures, and check the attached pbix file.
Count based on the condition measure: =
VAR available_table =
FILTER ( Data, Data[Shipping Condition] = "Ship as available" )
VAR complete_table =
FILTER (
SUMMARIZE ( Data, Data[Order No], Data[Shipping Condition] ),
Data[Shipping Condition] = "Ship complete"
)
RETURN
COUNTROWS ( available_table ) + COUNTROWS ( complete_table )
Count measure: =
COUNTROWS( Data )
Hi Jihwan_Kim,
Thank you. The DAX function shared is working as expected.
Regards,
Jajati Dev
Hi,
Please try the below measures, and check the attached pbix file.
Count based on the condition measure: =
VAR available_table =
FILTER ( Data, Data[Shipping Condition] = "Ship as available" )
VAR complete_table =
FILTER (
SUMMARIZE ( Data, Data[Order No], Data[Shipping Condition] ),
Data[Shipping Condition] = "Ship complete"
)
RETURN
COUNTROWS ( available_table ) + COUNTROWS ( complete_table )
Count measure: =
COUNTROWS( Data )
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
8 | |
7 |