Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Dax table SUMX Distinctcount

Hi!

 

I got a database log that collect info about my picking rounds.

 

I´ve tried to create a new table that sums the info about the rounds but my DAX knowledge is unfortunatley not so good.

 

Reg-dateUserPick-CodeQueueRoundWeightVolume
2019-01-28 13:57:4411111310555550,121,15
2019-01-28 13:55:3011111310555551,008,21
2019-01-28 13:54:1111111310555550,613,17
2019-01-28 13:53:3811111310555550,223,31
2019-01-28 13:52:3211111310555550,784,80
2019-01-28 13:51:3811111310555551,569,60
2019-01-28 13:50:1611111310555551,569,60
2019-01-28 14:00:0222222320666661,4515,14
2019-01-28 13:59:2022222320666660,622,09
2019-01-28 13:58:4222222320666660,845,25
2019-01-28 13:57:1222222320666660,854,59
2019-01-28 13:56:2022222320666661,895,87
2019-01-28 13:55:1922222320666660,832,06
2019-01-28 13:53:4922222320666661,8618,58
2019-01-28 13:51:4822222320666660,551,98
2019-01-28 13:51:1622222320666660,030,18
2019-01-28 13:50:4422222320666660,632,28

 

 

 

 

What i want to do is to create a table that looks like this. The round is distinct and a want to sum up weight and volume on my rounds and i want to show how many of "Pick codes" that is on the round.

From that table i will be able to create measures :)

 

DateRoundUserNr of codesQueueWeightVolume
2019-01-2855555111117105,8439,83
2019-01-28666662222210209,5458,01

 

Does anyone have a good DAX forumla idea?

I´ve tried SUMX and DISTINCT

 

  • Anonymous something like this and you can tweak as per your need:

     

    Table 2 = 
    SUMMARIZECOLUMNS(
        Table1[Reg-date].[Date],
        Table1[Round],
        Table1[User],
        Table1[Queue],
        "Nr of codes", 
        COUNT( Table1[Pick-Code] ),
        "Weight",
        SUM(Table1[Weight]),
        "Volume",
        SUM(Table1[Volume] ) 
    )
        

3 Replies

  • Anonymous you can create new table using summarizecolumns DAX function

    • parry2k's avatar
      parry2k
      Icon for Super User rankSuper User

      Anonymous something like this and you can tweak as per your need:

       

      Table 2 = 
      SUMMARIZECOLUMNS(
          Table1[Reg-date].[Date],
          Table1[Round],
          Table1[User],
          Table1[Queue],
          "Nr of codes", 
          COUNT( Table1[Pick-Code] ),
          "Weight",
          SUM(Table1[Weight]),
          "Volume",
          SUM(Table1[Volume] ) 
      )
          
      • Anonymous's avatar
        Anonymous
        Not applicable

        You solved it :)

         

        Thanks!