Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Tobjoh
New Member

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

 

1 ACCEPTED SOLUTION

@Tobjoh 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] ) 
)
    


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Tobjoh you can create new table using summarizecolumns DAX function



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@Tobjoh 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] ) 
)
    


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

You solved it 🙂

 

Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors