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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.