Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Team,
I am a bit confused. Could you help me please?
I want to sum the number of items per order id. In my table, the order id shows multiple times as well as the item count.
What I want to achieve is like:
Order_alpha_id Item count
zz999 8
Solved! Go to Solution.
Hi @Andrew_na_lang,
I suggest you to create a measure to achieve your goal.
Sample:
Measure:
M_Item_Count =
CALCULATE(COUNTROWS('Table'))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Andrew_na_lang,
I suggest you to create a measure to achieve your goal.
Sample:
Measure:
M_Item_Count =
CALCULATE(COUNTROWS('Table'))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can create a new table using DAX:
SUMMARIZE(<TableName>,[Order_alpha_id ], "CountbyOrderID",Count(order_id))
See if this gives you teh required result.
@PC2790 this sums the number of items per row.
ZZ999 instead of 8 items only, gives me 64 instead.
That should not be possible,
Can you give me your data in copyable format?
No mate. It didn't work.
what error are you getting?
You can also try grouping the table in power Query
Transform Data--> Home -->Group by
filed name as alpha id and create a new column with operation as Count Rows and Column as your order id
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |