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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
smitha_
New Member

Need to create a calculated measure , from Date table ,where date table is imported from other model

Need to create a calculated measure to display ,Latest completed week and all other weeks in a slicer, from Date table ,where date table is imported from other model.

smitha__0-1754378277253.png

 

Date table

Date ID (YYYYMMDD)Calendar - DateCalendar - Day of Week NumberDATE_ISO_DATE_FORMATFiscal - Day Of The YearCalendar - Day Of The YearCalendar - Previous DayCalendar - Same Date Last WeekCalendar - Same Date 2 Weeks AgoCalendar - Same Date 3 Weeks AgoCalendar - Same Date 4 Weeks AgoCalendar - Same Date Last YearCalendar - Same Date 2 Years AgoCalendar - Same Date 3 Years AgoCalendar - Same Date 4 Years AgoFiscal - Same Date in FY2019Calendar - Days from TodayCalendar - Week ID (YYYYWW)Calendar - Week NumberCalendar - Week of Month NumberCalendar - Weeks from Current WeekCalendar - Month ID (YYYYMM)Calendar - Month NumberCalendar - Months from Current MonthCalendar - Quarter ID (YYYYQ)Calendar - Quarter NumberCalendar - Quarter DisplayCalendar - Quarters from Current QuarterCalendar - Year NumberCalendar - Years from Current YearFiscal - Week ID (YYYYWW)Fiscal - Week NumberFiscal - Week DisplayFiscal - Week Short DisplayFiscal - Week Start DateFiscal - Week End DateFiscal - Week of Period NumberFiscal - Weeks from Current WeekFiscal - Period ID (YYYYPP)Fiscal - Period NumberFiscal - Period NameFiscal - Weeks in PeriodFiscal - Period Start DateFiscal - Period End DateFiscal - Periods from Current PeriodFiscal - Quarter ID (YYYYQ)Fiscal - Quarter NumberFiscal - Quarter NameFiscal - Quarter Short NameFiscal - Quarter Start DateFiscal - Quarter End DateFiscal - Quarters from Current QuarterFiscal - Half NumberFiscal - Half Start DateFiscal - Half End DateFiscal - Year NumberFiscal - Year Start DateFiscal - Year End DateFiscal - Years from Current YearCalendar - Weekend IndicatorETL_INSERT_TSETL_UPDATE_TS
201701311/31/201722017-01-312311/30/20171/24/20171/17/20171/10/20171/3/20172/2/20162/3/20152/4/20142/5/20131/29/2019-31062017055-46-4432017011-103201711Q1-342017-82017011Week 01011/30/20172/5/20171-4432017011Period 0141/30/20172/26/2017-101201711Quarter 1Q11/30/20174/30/2017-3311/30/20177/30/201720171/30/20171/28/2018-8N1/16/2024 2:03:51 PM8/3/2025 12:01:15 AM
201702012/1/201732017-02-013321/31/20171/25/20171/18/20171/11/20171/4/20172/3/20162/4/20152/5/20142/6/20131/30/2019-310520170551-4432017022-102201711Q1-342017-82017011Week 01011/30/20172/5/20171-4432017011Period 0141/30/20172/26/2017-101201711Quarter 1Q11/30/20174/30/2017-3311/30/20177/30/201720171/30/20171/28/2018-8N1/16/2024 2:03:51 PM8/3/2025 12:01:15 AM
201702022/2/201742017-02-024332/1/20171/26/20171/19/20171/12/20171/5/20172/4/20162/5/20152/6/20142/7/20131/31/2019-310420170551-4432017022-102201711Q1-342017-82017011Week 01011/30/20172/5/20171-4432017011Period 0141/30/20172/26/2017-101201711Quarter 1Q11/30/20174/30/2017-3311/30/20177/30/201720171/30/20171/28/2018-8N1/16/2024 2:03:51 PM8/3/2025 12:01:15 AM
201702032/3/201752017-02-035342/2/20171/27/20171/20/20171/13/20171/6/20172/5/20162/6/20152/7/20142/8/20132/1/2019-310320170551-4432017022-102201711Q1-342017-82017011Week 01011/30/20172/5/20171-4432017011Period 0141/30/20172/26/2017-101201711Quarter 1Q11/30/20174/30/2017-3311/30/20177/30/201720171/30/20171/28/2018-8N1/16/2024 2:03:51 PM8/3/2025 12:01:15 AM
201701301/30/201712017-01-301301/29/20171/23/20171/16/20171/9/20171/2/20172/1/20162/2/20152/3/20142/4/20131/28/2019-31072017055-46-4432017011-103201711Q1-342017-82017011Week 01011/30/20172/5/20171-4432017011Period 0141/30/20172/26/2017-101201711Quarter 1Q11/30/20174/30/2017-3311/30/20177/30/201720171/30/20171/28/2018-8N1/16/2024 2:03:51 PM8/3/2025 12:01:15 AM
1 ACCEPTED SOLUTION
v-pgoloju
Community Support
Community Support

Hi @smitha_,

Thank you for reaching out to the Microsoft Fabric Forum Community.  Thanks to @MFelix for prompt and helpful response.

Based on my understanding of your requirements, I have provided the suggestions below. If I have misunderstood anything, or if you are still facing issues, please provide more context as suggested by @smitha_  so that we can assist you further.

 

 

I'm assuming, The Date table contains a [Calendar - Week ID (YYYYWW)] column to uniquely identify each week, a [Calendar - Week Number] column, and both [Calendar - Week Start Date] and [Calendar - Week End Date] columns to determine if a week is complete. It follows a standard date table structure with at least one row for each day. 

 

Create a measure to get week Id
Latest_Completed_Week_ID = 
CALCULATE(MAX('Date'[Calendar - Week ID (YYYYWW)]),
    FILTER('Date', 'Date'[Calendar - Week End Date] < TODAY()))

Create a calculated column to 
Week_Filter = 
VAR LatestWeek = CALCULATE(MAX('Date'[Calendar - Week ID (YYYYWW)]),
        FILTER( 'Date', 'Date'[Calendar - Week End Date] < TODAY()))
RETURN
IF('Date'[Calendar - Week ID (YYYYWW)] <= LatestWeek, "Show", "Hide")

 

 

Best regards,
Prasanna Kumar

View solution in original post

6 REPLIES 6
v-pgoloju
Community Support
Community Support

Hi @smitha_,

 

Just following up to see if the response provided was helpful in addressing the issue. If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

swathigouda
Regular Visitor

hi @smitha_ hope this helps 

Slicer column =
VAR weekno = WEEKNUM('Calendar'[Date])
VAR max_weekno = MAX('Calendar'[Week of Year])

RETURN
IF(
    weekno < max_weekno,
    FORMAT('Calendar'[Year],"0000") & " week"  & FORMAT(weekno, "0"),
    "Latest week " & FORMAT(weekno, "0")
)
v-pgoloju
Community Support
Community Support

Hi @smitha_,

 

Just following up to see if the response provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

 

Best regards,

Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @smitha_,

 

Just following up to see if the response provided was helpful in addressing the issue. If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @smitha_,

Thank you for reaching out to the Microsoft Fabric Forum Community.  Thanks to @MFelix for prompt and helpful response.

Based on my understanding of your requirements, I have provided the suggestions below. If I have misunderstood anything, or if you are still facing issues, please provide more context as suggested by @smitha_  so that we can assist you further.

 

 

I'm assuming, The Date table contains a [Calendar - Week ID (YYYYWW)] column to uniquely identify each week, a [Calendar - Week Number] column, and both [Calendar - Week Start Date] and [Calendar - Week End Date] columns to determine if a week is complete. It follows a standard date table structure with at least one row for each day. 

 

Create a measure to get week Id
Latest_Completed_Week_ID = 
CALCULATE(MAX('Date'[Calendar - Week ID (YYYYWW)]),
    FILTER('Date', 'Date'[Calendar - Week End Date] < TODAY()))

Create a calculated column to 
Week_Filter = 
VAR LatestWeek = CALCULATE(MAX('Date'[Calendar - Week ID (YYYYWW)]),
        FILTER( 'Date', 'Date'[Calendar - Week End Date] < TODAY()))
RETURN
IF('Date'[Calendar - Week ID (YYYYWW)] <= LatestWeek, "Show", "Hide")

 

 

Best regards,
Prasanna Kumar

MFelix
Super User
Super User

Hi @smitha_ ,

 

Can you give some more context on what you want to calculate and expected result?

If you are able to give some more context we are able to help you better.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors