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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JoergSch
Frequent Visitor

Generate Date table dynamically based on What-If parameter

Hi,

 

I am trying to generate a date table dynamical based on a provided interval and history which I select via a What-If-Parameter.

 

What-If-Parameter "Threshold History" provides the history in minutes from 1 to 120.

What-If-Parameter "Threshold Interval" provides the interval for the date series in minutes from 1 to 30.

 

The date table is calculated as following:

 

DateTimeTable = GENERATESERIES (
MAXX ( ALL('Log'),'Log'[CreatedOn] ) - TIME(0,'Threshold History'[Threshold History Value],0) ,
MAXX ( ALL('Log'),'Log'[CreatedOn] ) ,
TIME ( 0,'Threshold Interval'[Threshold Interval Value], 0)
)
 
The output is 
image.png
 
My problem is that e.g. the Interval is not changing when I change the What-If-Parameter "Threshold Interval".
 
How can I achieve that the user could dynamically select the Interval (or the History start)?
 
Many thanks
 
Joerg 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@JoergSch , You can not use slicer value in a calculated table.

 

Such tables can be created only as var table in a measure

 

meausre =

var _tab  = GENERATESERIES (
MAXX ( ALL('Log'),'Log'[CreatedOn] ) - TIME(0,'Threshold History'[Threshold History Value],0) ,
MAXX ( ALL('Log'),'Log'[CreatedOn] ) ,
TIME ( 0,'Threshold Interval'[Threshold Interval Value], 0)
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
JoergSch
Frequent Visitor

So, I cannot create a dynamic date series to calculate other measures based on these dynamic dates? 

Hi, @JoergSch 

I'm afraid currently PowerBI doesn't support creating dynamically calculated calendar tables.

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@JoergSch , You can not use slicer value in a calculated table.

 

Such tables can be created only as var table in a measure

 

meausre =

var _tab  = GENERATESERIES (
MAXX ( ALL('Log'),'Log'[CreatedOn] ) - TIME(0,'Threshold History'[Threshold History Value],0) ,
MAXX ( ALL('Log'),'Log'[CreatedOn] ) ,
TIME ( 0,'Threshold Interval'[Threshold Interval Value], 0)
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.