cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
yash_atluri
Regular Visitor

RE : How to average value with group by and summarized

Hi all ,

i am trying to write a dax function to calculate  the total time recorded by the worker , by grouping the jira id and name . here is the dataset . The column total has the time recorded by the worker . can anyone please help out with this ? Thanks in advance.

 

yash_atluri_0-1634744716565.png

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@yash_atluri 

Or a simple average measure should work. The table visual will automatically group by the included columns like Name and Jira, although they are the same in this sample.

 

Measure = AVERAGE([total])

Vpazhenmsft_2-1635402774759.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
V-pazhen-msft
Community Support
Community Support

@yash_atluri 

Or a simple average measure should work. The table visual will automatically group by the included columns like Name and Jira, although they are the same in this sample.

 

Measure = AVERAGE([total])

Vpazhenmsft_2-1635402774759.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

HotChilli
Super User
Super User

I didn't use any DAX. Just added the fields to a table visual and changed the aggregation on Total to be average

HotChilli
Super User
Super User

I'm confused.  I put the 2 fields in a table, selected average for the Total field and it gets the required result.

What am I missing?

(also why is the Total field a rowcount - so that makes it different from the original posted picture where it's all 1 and it's not total time either - which is 10 minutes on each row)?

Screenshot 2021-10-26 215915.png

can you send me the dax you used ? i just want to try on original data ?

 

HotChilli
Super User
Super User

Yes, I saw the column but it was 1 all the way.  It didn't look right.

If you repost the data (not a picture) and show me what the desired output is, I'll have a go

https://mega.nz/file/yVoFRATQ#v5gyEoPYpxJGnDhbePONL19R8iWOxjbc1VCdLYJgoyw

 

hi here is the xlsx file which has the data and the pivot table has desired values i need , i hope it helps ?

HotChilli
Super User
Super User

The first thing to do is to get the time worked in each row (a time_worked column).  I would probably do this in Power Query but you can use DATEDIFF (and from , to have to be datetime type) if you want to do it in DAX.

You should be able to create a visual with id and name, and sum the new Time_worked column.

If you want a separate calculated table, you can use SUMMARIZECOLUMNS

The total is the column where it has time worked in the each row , when i am creating a visual , the total time worked by worker is showing correctly , but when i am selecting average instead of sum , it averages the total based on time entry , but here  total time entries needs to by grouped by jira and average of that  is needed

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors