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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
manoj_0911
Advocate V
Advocate V

Dynamic trend granularity (30 min / hour / day / week / month) in Power BI

I am building a contact center report where users need to switch the trend granularity dynamically between:

30 minutes
hour
day
week
month
quarter
year

 

The dataset is based on call center interval data (30 min buckets).

 

I currently use a Date table and field parameters, but I'm looking for the best modelling approach to support:

• dynamic axis switching
• drilldown hierarchy
• good performance

 

How have others implemented this in enterprise Power BI models?

2 ACCEPTED SOLUTIONS
Kedar_Pande
Super User
Super User

@manoj_0911 

 

Create disconnected Granularity table: { "30min", "Hour", "Day", "Week", "Month", "Qtr", "Year" }

 

Granularity Rank table linking to your 30min intervals:

Granularity Sort = 
SWITCH(
SELECTEDVALUE(Granularity[Granularity], "Day"),
"30min", 'Intervals'[Interval],
"Hour", HOUR('Intervals'[Interval]),
"Day", DAY('Intervals'[Interval]),
"Week", WEEKNUM('Intervals'[Interval]),
"Month", MONTH('Intervals'[Interval]),
"Qtr", QUARTER('Intervals'[Interval]),
"Year", YEAR('Intervals'[Interval])
)

Slicer on Granularity table → Line chart X-axis = Granularity Sort, Y-axis = your measure. Field parameters for drilldown if needed

View solution in original post

cengizhanarslan
Super User
Super User

1) Use two dimensions: Date + Time/Interval

Keep a standard Date dimension and add a small Time / Interval dimension.

 

2) Use Field Parameters for dynamic axis

Field parameters are currently the cleanest way to switch trend granularity.

Trend Axis =
{
    ("30 Min", NAMEOF('Time'[HalfHour]), 0),
    ("Hour", NAMEOF('Time'[Hour]), 1),
    ("Day", NAMEOF('Date'[Date]), 2),
    ("Week", NAMEOF('Date'[Week]), 3),
    ("Month", NAMEOF('Date'[Month]), 4),
    ("Quarter", NAMEOF('Date'[Quarter]), 5),
    ("Year", NAMEOF('Date'[Year]), 6)
}

 

3) Performance considerations

If your Fact table is huge:

  • Avoid calculated columns in the fact table

  • Use aggregations at the visual level rather than storing hourly/daily aggregates

  • Ensure your Date and Time dimensions are small and optimized

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

View solution in original post

6 REPLIES 6
danextian
Super User
Super User

Hi @manoj_0911 

Field parameters  is the most lightweight of the options. You should still be able to drilldown by using another field in the visual.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @manoj_0911 ,

I would also take a moment to thank @danextian   , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I hope the issue has been resolved. If you continue to experience any problems, please reach out here and we will assist you.

Best Regards, 
Community Support Team

Hi @manoj_0911 ,

I hope the issue has been resolved. If you continue to experience any problems, please reach out here and we will assist you.

Best Regards, 
Community Support Team

cengizhanarslan
Super User
Super User

1) Use two dimensions: Date + Time/Interval

Keep a standard Date dimension and add a small Time / Interval dimension.

 

2) Use Field Parameters for dynamic axis

Field parameters are currently the cleanest way to switch trend granularity.

Trend Axis =
{
    ("30 Min", NAMEOF('Time'[HalfHour]), 0),
    ("Hour", NAMEOF('Time'[Hour]), 1),
    ("Day", NAMEOF('Date'[Date]), 2),
    ("Week", NAMEOF('Date'[Week]), 3),
    ("Month", NAMEOF('Date'[Month]), 4),
    ("Quarter", NAMEOF('Date'[Quarter]), 5),
    ("Year", NAMEOF('Date'[Year]), 6)
}

 

3) Performance considerations

If your Fact table is huge:

  • Avoid calculated columns in the fact table

  • Use aggregations at the visual level rather than storing hourly/daily aggregates

  • Ensure your Date and Time dimensions are small and optimized

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.
Kedar_Pande
Super User
Super User

@manoj_0911 

 

Create disconnected Granularity table: { "30min", "Hour", "Day", "Week", "Month", "Qtr", "Year" }

 

Granularity Rank table linking to your 30min intervals:

Granularity Sort = 
SWITCH(
SELECTEDVALUE(Granularity[Granularity], "Day"),
"30min", 'Intervals'[Interval],
"Hour", HOUR('Intervals'[Interval]),
"Day", DAY('Intervals'[Interval]),
"Week", WEEKNUM('Intervals'[Interval]),
"Month", MONTH('Intervals'[Interval]),
"Qtr", QUARTER('Intervals'[Interval]),
"Year", YEAR('Intervals'[Interval])
)

Slicer on Granularity table → Line chart X-axis = Granularity Sort, Y-axis = your measure. Field parameters for drilldown if needed

grazitti_sapna
Super User
Super User

Hi @manoj_0911,

 

You are already using best approach by using date table and field parameters.

 

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.