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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
caseski
Helper I
Helper I

Sum rows corresponding to the same date and divide for number of days

Hi all,

 

I’m new to Power BI and above all I’m a novice in the use of powerQuery and dax and having no programming knowledge I cannot solve simple problems.

Now I'm trying to create a measure that allows you to sum values in the rows of a column corresponding to the same day and that divides by the number of days.

I try to explain myself better with a simplified table:

 

name

time

quantity

A

1/6/21 8.30

3,2

A

1/6/21 8.45

3,1

A

1/6/21 8.50

2,9

A

1/6/21 8.52

3,2

B

2/6/21 9.18

2,5

B

2/6/21 9.30

2,8

B

2/6/21 9.35

2,7

A

2/6/21 9.51

2,9

A

2/6/21 9.55

2,8

A

2/6/21 9.58

3,3

 

(time include also hours minutes and seconds)

 

The results is:

 

A = 21,4 / 2

Where:

21,4 = sum of quantity

2 = number of days

 

B = 8 / 1

 

I’d like also filter by months and name in order to visualize the total quantity for each name in every different month.

 

Thank you in advance

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @caseski 

I am not sure if I understood your question correctly, but please check the below picture and the sample pbix file's link down below.

 

Picture8.png

 

Result Measure =
SUM ( 'Table'[quantity] ) / COUNTROWS ( VALUES ( 'Table'[Date] ) )
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi, @caseski 

I am not sure if I understood your question correctly, but please check the below picture and the sample pbix file's link down below.

 

Picture8.png

 

Result Measure =
SUM ( 'Table'[quantity] ) / COUNTROWS ( VALUES ( 'Table'[Date] ) )
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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