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

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

Reply
luc
Frequent Visitor

Is there a way to use parameters as start and end of axis range?

By start and end of axis range, I mean these fields in the following image:
power-bi-y-axis.png

 

If you're curious why, I have a report model that asks for a startdate and enddate parameters when opened. I these dates to be the range for the visuals on this report.

3 REPLIES 3
Anonymous
Not applicable

Hey @luc

 

Short answer: I would just add a date slicer to your report and set the start and end date. You can sync this slicer across all pages of your report as well.

 

Long answer: Create your parameters and enable load in the Query Editor. Then you can create a calculated column that will look something like:

 

InRange = 
IF(
    AND(FIRSTNONBLANK(StartDate[StartDate],1) <= Table1[Date], FIRSTNONBLANK(EndDate[EndDate],1) >= Table1[Date])
    "Yes",
    "No"
)

Then you can add a Report Level filter for InRange = "Yes".

 

Hope this helps,

Parker

 

luc
Frequent Visitor

That doesn't work, I already filter the data based on these parameters when querying the data source. The problem is that if I want for example the x axis from a a visual to go from 03/01 to 03/31, if the y axis of that visual has value 0 at 03/01 the visual will automatically resize the x range to go from 03/02 to 03/31. Instead of resizing I want the visual to show a 0 even if there is no data for the first day of March.

Anonymous
Not applicable

I would receommend a Date table with a list of continuous dates in your date range. You can then set your X axis to use this date range and still use the calculated column I provided above. As for showing a 0 for that first date, I'm not sure about that. It might just show up as a blank.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.