Forum Discussion
Anonymous
6 years agoNot applicable
DAX SUM HELP
Ho can I calculate the sum of Qty in GRN. QTy in GRN is repeating for each line item, but i need to take the value once per each document no. Please help on this?
- 6 years ago
Hi Anonymous ,
You can use the measure below:
Measure 2 = CALCULATE ( SUMX ( SUMMARIZE ( 'Table (2)', 'Table (2)'[No_], "total", SUMX ( DISTINCT ( 'Table (2)'[Qty_ in Gen] ), 'Table (2)'[Qty_ in Gen] ) ), [total] ), FILTER ( 'Table (2)', 'Table (2)'[QC Result] = "Accepted without Deviation" ) )Best Regards,
Kelly
amitchandak
Super User
6 years agoTry. First one requires two measures
MAx Grn = max(Qty_in_grn)
Grn sum = sumx(values(table[No_]),[MAx Grn])
Or
Grn sum = sumx(summarize(table,"_grn",max(Qty_in_grn)),[_grn])
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners/ba-p/890814
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601