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
dedelman_clng
Community Champion
Community Champion

Trying to show evolving average based on number of records

I have a data set that looks like the following

IndexBusiness UnitDays to Hire
1Operations13
2Operations51
3Head Office41
4Operations98
5Head Office205
6Operations172
7Operations237
8Operations112
9Operations126
10Operations27
11Operations153
12Head Office42
13Head Office72

 

"Index" was added in PowerQuery, representing an ascending date field (e.g. 1 = Jan 1, 2 = Jan 5, 3 = Jan 17, etc). User wants to see the average of the "Days to Hire" column on a line chart where the X-axis is the number of records used to calculate the average. It was done in Excel like this:

 

TTH.png

 

The tricky part is user wants the line chart to be sliceable by Business Unit, so I can't use the just the Index field as the axis (numbers will be skipped). I know I can write a measure to dynamically count the number of records with an index <= the "current" index, but a measure can't be used as an X-axis. Calculated column doesn't refresh upon using the slicer, so that doesn't work either.

 

Anyone have the same use case and found a way to solve it?

 

Thanks

David

 

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

@dedelman_clng ,

 

I'm afraid this can't achieved by using slicer and changing settings in the X-axis of line chart. As a workaround, you may try create several calculate columns using different filter condition instead of slicer, then create several line charts separately using these calculate columns in different pages. Finally create several bookmarks and buttons on these pages and configure the button action.

For more details about bookmark, please refer to doc below:

https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks

 

Community Support Team _ Jimmy Tao

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

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@dedelman_clng ,

 

I'm afraid this can't achieved by using slicer and changing settings in the X-axis of line chart. As a workaround, you may try create several calculate columns using different filter condition instead of slicer, then create several line charts separately using these calculate columns in different pages. Finally create several bookmarks and buttons on these pages and configure the button action.

For more details about bookmark, please refer to doc below:

https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Thanks @v-yuta-msft .  I don't think that bookmarks is a good strategy in my specific case, as the user will be accessing the dashboard thru Power BI Desktop. But its good to know I'm not missing something obvious.

 

Thanks

David

 

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.