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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Using measure/dynamic value for <endvalue> in GENERATESERIES() function

Hello, 

I am using a parameter generated from the What If functionality in PBI Desktop. I am using the parameter value in another measure to determine the amount of months to include in a rolling average. This parameter series is on a slicer so that users can select how large the rolling period will be. 

I am trying to get the <endvalue>/max value of the parameter to be the # of months between the max and min dates that are currently within the page's filter context. Users will also be able to change the date range using a page filter (ranging anywhere from 2016 and 2020) and thus I would like to have the max value of the parameter slicer adjust to the selected range.  

This is what I currently have for my DAX:

hunterfeldman_0-1602780496703.png


Please let me know if this is currently possible with the GENERATESERIES() function or if there is a workaround with another function. 

Thank you. 

2 REPLIES 2
Anonymous
Not applicable

What you have to do to get what you want is use the Filter Pane (Filter This Visual) and create a measure that will depend on the visible dates. Then use the measure to filter your slicer for the right choices in the current setting.

Anonymous
Not applicable

Measures CANNOT return tables, so this will never work. GENERATESERIES with more than 1 value is a table, not a scalar.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.