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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Josearce
Regular Visitor

Calendar

Can you do one of calendars and how to put from/to week. Example: I have a list of dates from 8/27 to 9/2 and on another column I need that for those dates says 8/27 - 9/2, can that be done?
1 ACCEPTED SOLUTION

Hi @Josearce,

 

Have you solved your problem? If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please try the formula below.

 

Column =
VAR currentmonth = 'Calendar Table'[Date].[MonthNo]
VAR currentday = 'Calendar Table'[Date].[Day]
VAR maxmonth =
    MONTH ( MAX ( 'Calendar Table'[Date] ) )
VAR maxday =
    DAY ( MAX ( 'Calendar Table'[Date] ) )
RETURN
    currentmonth & "/"
        & currentday
        & "-"
        & maxmonth
        & "/"
        & maxday

 

result output.PNG

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
gipiluso
Resolver II
Resolver II

you should be able to reach your requirement just configuring the slicer with between properties (see attached)

slicer_between.PNG

Ok, sorry for not explaining. I have a calendar table with a list of dates. What I need is to add another columnn that on the row that says 8/27 indicates 8/27 - 9/2, on the row that says 8/28 says 8/27 to 9/2 and so on.

Hi @Josearce

 

Please clarify if

 

1)  "What I need is to add another columnn that on the row that says 8/27 indicates 8/27 - 9/2, on the row that says 8/28 says 8/27 to 9/2 and so on."

      The above rule is constant and that for the entire period between 8/27 to 9/2 the column should have "8/27-9/2".

 

2)  If the calendar has several years of data, is the same rule to be applied for other years for the period "8/27 -9/2"

 

Share some data / pbix file on google drive / one drive and share the link here.

 

Cheers

 

CheenuSing

 

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Weekfromto =

VAR Desde = format(Calculate(min('Calendar Table'[Date]),ALLEXCEPT('Calendar Table','Calendar Table'[Year],'Calendar Table'[Week#])),"mmm-dd-yy")

VAR Hasta = format(Calculate(max('Calendar Table'[Date]),ALLEXCEPT('Calendar Table','Calendar Table'[Year],'Calendar Table'[Week#])),"mmm-dd-yy")

 

RETURN

 

Desde &" - "& Hasta

 

Desde means From

Hasta means Through

Hi @Josearce,

 

Have you solved your problem? If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please try the formula below.

 

Column =
VAR currentmonth = 'Calendar Table'[Date].[MonthNo]
VAR currentday = 'Calendar Table'[Date].[Day]
VAR maxmonth =
    MONTH ( MAX ( 'Calendar Table'[Date] ) )
VAR maxday =
    DAY ( MAX ( 'Calendar Table'[Date] ) )
RETURN
    currentmonth & "/"
        & currentday
        & "-"
        & maxmonth
        & "/"
        & maxday

 

result output.PNG

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.