Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

How to get sumx for 2 rows

Hi all,

 

When I use below measure, it can give me correct value except for 2 production order in 1 days as below example. It only ready 1 row of data, instead it should sum the usage.

 

Actual Data

DayProduction OrderAbnormalityUsageLoss
19100002662891Joint72930
19100002662906Joint886986

 

Result from the measure

DayAbnormalityUsageLoss
19Joint886986

 

 

 

Usage measure =
SUMX(
    SUMMARIZE (
        CALCULATETABLE('For Graph',ALL('For Graph'[Abnormality])),
        'For Graph'[Day],
        'For Graph'[SAP_PPT_EV_MaterialDocument_GI (2).Total GI Coating]
    ),
    'For Graph'[SAP_PPT_EV_MaterialDocument_GI (2).Total GI Coating]
)
 
Regards,
Nuha

2 Replies

  • Anonymous , Take Simple sum of usage and the sum of loss

     

    or a measure like

    sumx(Summarize(Table,[Production Order],[Abnormality], [Day],[Usage]), [Usage] )

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak ,

       

      Already done the measure but the result still the same.

       

       

      Usage measure =

      SUMX(
          SUMMARIZE ('For Graph','For Graph'[OrderNumber_AUFNR],'For Graph'[Abnormality],'For Graph'[Day],'For Graph'[SAP_PPT_EV_MaterialDocument_GI (2).Total GI Coating]),'For Graph'[SAP_PPT_EV_MaterialDocument_GI (2).Total GI Coating])

       

      Regards,

      Nuha