Forum Discussion
aschillinger20
5 years agoHelper II
Distinct sum based on unique value
I have some production data that duplicates when another user signs into an order. Here is a basic examaple: Productction Order Number | Production Hours 1001 ...
- 5 years ago
aschillinger20 - Sorry man, missed a paren placement.
Measure = SUMX(SUMMARIZE('Production data',[prod_order_number],"_PRODUCTION HOURS", MAX([P21_hour_qty])),[_PRODUCTION HOURS])That should be the right one.
amitchandak
5 years agoSuper User
aschillinger20 , Try like
Total Production Hours = sumx(values('Production Data'[Production Order]), Max(Production data [Production Hours]))
or
Total Production Hours = sumx(Summarize('Production Data', 'Production Data'[Production Order],"_1", Max(Production data [Production Hours])),[_1])
- aschillinger205 years agoHelper II
the first formula is calculating a significantly higher number when i load into my workbook. I should be getting 328, and i'm getting over 13,000.
The second formula i get an error: Column: 'MAX Production Hours' in table 'production data' cannot be found or may not be used in this expression.