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
rainynights
Helper II
Helper II

Plotting average time by no. of weeks, but counting only weeks with more than 1 data point.

Essentially, what I'm trying to do is plotting the average marathon time (y-axis), by the number of weeks a person has been running for, while trying to exclude data from weeks there is only 1 person.

 

This picture provides a great graphical illustration of it: https://i.gyazo.com/08544e711adb796da5354e50dd7806ca.png

08544e711adb796da5354e50dd7806ca

 

 

Essentially, I'm trying to plot avg time to finish a run for each runner that has been running for 1 week, for 2 weeks, for 3 weeks, etc.

 

However, one thing I'm also noticing is that weeks in which we only have data for 1 person are significantly skewing the results.

 

For example, in the picture, we see that the avg running time for the 47 weeks mark is really high, because only 1 person has been running for 48 weeks, and because their run-time that day was really slow, they skewed that figure really high.

 

What I'm trying to do is amend the measure (which at the moment is just taking all averages) to only include weeks in which more than one person ran, but I'm not even sure where to start!

 

I think it would also be amazingly helpful if this could be added as a what-if parameter (i.e. so the dashboard consumer can set the minimum threshold of runners needed as they wish).

1 ACCEPTED SOLUTION

Hi @rainynights ,

 

SUMMARIZE your data

https://docs.microsoft.com/en-us/dax/summarize-function-dax

FILTER your data

https://docs.microsoft.com/en-us/dax/filter-function-dax

get the AVERAGEX of your data

https://docs.microsoft.com/en-us/dax/averagex-function-dax

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

2 REPLIES 2

Hi @rainynights ,

 

has your question been answered?

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @rainynights ,

 

SUMMARIZE your data

https://docs.microsoft.com/en-us/dax/summarize-function-dax

FILTER your data

https://docs.microsoft.com/en-us/dax/filter-function-dax

get the AVERAGEX of your data

https://docs.microsoft.com/en-us/dax/averagex-function-dax

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.