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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

GROUP BY Calculation

Hi, I have this Sprint data

 

1.png

 

 

 

 

 

 

 

And I want to calculate de "CALCULATION" column in Power BI

2.png

 

 

 

 

 

 

This is the SUM of Points for each Sprint DIVIDED BY COUNT of days for each Sprint 

 

Thanks in advance,

 

 

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may use the following DAX to add a calculated column.

Column =
DIVIDE (
    SUMX ( RELATEDTABLE ( Table2 ), Table2[Points] ),
    COUNTROWS ( FILTER ( Table1, Table1[SPRINT] = EARLIER ( Table1[SPRINT] ) ) )
)

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may use the following DAX to add a calculated column.

Column =
DIVIDE (
    SUMX ( RELATEDTABLE ( Table2 ), Table2[Points] ),
    COUNTROWS ( FILTER ( Table1, Table1[SPRINT] = EARLIER ( Table1[SPRINT] ) ) )
)

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@Anonymous Do you need this as a column? The other members equation does work if you use it as a measure. How are you

using this calculation further?

Group2.PNGGroup1.PNG

az38
Community Champion
Community Champion

Hi @Anonymous 

try a simple

= DIVIDE(SUM([Points]), COUNT([DAYS]))

but before be sure there is a relationship between your tables

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Wouldn't this just give the Total Points / Total Days? 700 / 12

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.