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! Request now

Reply
Anonymous
Not applicable

Converting the below dax as Parameter to limit the data in calendar table

Hi Team,

 

I have a Dim_Calendar table and I want to filter my calender to limit the data, the start date for the calendar is a dynamic value picking from other table the Dax is as below where I am getting the required output, this same output should be used as filter as shows below and this out put should be dynamic.

Rakeshss_0-1709625802437.png

 

VAR _MaxSnapShotDate = MAX(EU_OMP_PROD_LOC_PLANVIEW_DAILY_FACT[SNAPSHOT_DATE])
VAR _MaxSnapShotDateWeekenDate = WEEKDAY(_MaxSnapShotDate,2)
VAR Result =
SWITCH(TRUE,
_MaxSnapShotDateWeekenDate = 1,_MaxSnapShotDate +6,
_MaxSnapShotDateWeekenDate = 2,_MaxSnapShotDate +5,
_MaxSnapShotDateWeekenDate = 3,_MaxSnapShotDate +4,
_MaxSnapShotDateWeekenDate = 4,_MaxSnapShotDate +3,
_MaxSnapShotDateWeekenDate = 5,_MaxSnapShotDate +2,
_MaxSnapShotDateWeekenDate = 6,_MaxSnapShotDate +1,
_MaxSnapShotDateWeekenDate = _MaxSnapShotDate)
Return
Result-125

 

I want to convert this dax as paramenter and filter my date table.

 

 

Thanks !

Rakesh

2 REPLIES 2
Anonymous
Not applicable

HI @Anonymous,

Did you mean to create a dynamic calculated table/column based on filter effect? AFAIK, current power bi does not support these. They work on different levels, and you can't use the child level to affect the parent level.

Notice: the data level of power bi(from parent to child level)

Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)

Regards,

Xiaoxin Sheng

some_bih
Super User
Super User

Hi @Anonymous one possible solution is to create Calendar / Date table with DAX as shown on link

In that example column Sales[Order Date] is used to create Min and Max date so in your case apply your column/s





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

Proud to be a Super User!






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors