Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

summarize data

 

hi , i have created a measure MaxID and drag column Requisition_id to get a clustered column visualization. the data came as:

 

MaxIDrequisition_id
199
4100
5101
4102
5103
4104
5105
4106
5107
5108
4109
5110
5111
4112
5113
5114
5115
5116
5117

 

actual data i need is given below:

 

Max IDCount of requisition_id
135
232
314
4129
5229
617
7117

 

 

please help.

  • Hi Anonymous

    From you information, MaxID should be the max requisition_event_id per requisition_idCount of requisition_id should be the count of requisition_id per MaxID, right?

     

    in my test, [Measure] is the  MaxID, i could also create a calculated column max to replace it, then create another column count for Count of requisition_id.

    count = CALCULATE(COUNT(Sheet1[requisition_id,]),ALLEXCEPT(Sheet1,Sheet1[max]))
    
    max = CALCULATE(MAX([requisition_event_id,]),ALLEXCEPT(Sheet1,Sheet1[requisition_id,]))

     

     

    Or if you need distintcount, you can use the following formula

    distintcount = CALCULATE(DISTINCTCOUNT(Sheet1[requisition_id,]),ALLEXCEPT(Sheet1,Sheet1[max]))

     

    Best Regards

    Maggie

     

     

     

12 Replies

  • PattemManohar's avatar
    PattemManohar
    Community Champion
    Anonymous It will be great if you can share the sample data on which you have created the measure. Also, DAX formula that you used to create the measure.
    • Anonymous's avatar
      Anonymous
      Not applicable

      hi PattemManohar thanks for reply:

       

      Dax formula for Max ID is MaxID = MAx('eta requisition_life_cycles'[requisition_event_id]) 

       

      and table is 

      id event_name, sequencerequired, requires_upload created_atupdated_at
      1Created By User | Awaiting HOD's Approval11022-06-2018 7:2422-06-2018 7:26
      2Approved by HOD | Awaiting Store's Approval21022-06-2018 7:2522-06-2018 7:26
      3Approved by Store | Awaiting Delivery31022-06-2018 7:2610-07-2018 6:48
      4Rejected by Store | Requisition Closed30022-06-2018 7:2706-08-2018 15:02
      5Delivered | Requisition Closed31010-07-2018 6:4909-08-2018 8:06
      6Rejected by HOD | Requisition Closed20006-08-2018 14:1906-08-2018 14:19
      7Auto- approved20025-10-2018 16:3725-10-2018 16:37
      • Anonymous's avatar
        Anonymous
        Not applicable

        hi PattemManohar

         

        sorry the sample of table data is given below

         

        id,requisition_id,requisition_event_id,upload_link,created_by,updated_by,created_at,updated_at
        220991 50450407-10-2018 20:0607-10-2018 20:06
        2211001 59659608-10-2018 11:3508-10-2018 11:35
        2221011 59659608-10-2018 11:4008-10-2018 11:40
        2231021 59659608-10-2018 11:4708-10-2018 11:47
        2241031 41941908-10-2018 12:2508-10-2018 12:25
        2251041 41941908-10-2018 12:2708-10-2018 12:27
        2261051 31031008-10-2018 14:1508-10-2018 14:15
        2271061 31031008-10-2018 14:1508-10-2018 14:15
        2281071 31031008-10-2018 14:1608-10-2018 14:16
        2291081 31031008-10-2018 14:1608-10-2018 14:16
        2301091 31031008-10-2018 14:1708-10-2018 14:17
        2311101 31031008-10-2018 14:1708-10-2018 14:17
        2321111 31031008-10-2018 14:1808-10-2018 14:18
        2331121 31031008-10-2018 14:1908-10-2018 14:19
        2341131 31031008-10-2018 14:2008-10-2018 14:20
        2351141 25125108-10-2018 15:0008-10-2018 15:00