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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Syndicate_Admin
Administrator
Administrator

Filtro de fecha del calendario semanal para el año que comienza un jueves

Hola equipo,

¿Alguien puede compartir un archivo PBIX que muestre un calendario semanal que comienza un jueves de 2022 a 2024?

También quiero poder filtrar los datos con una segmentación semanal para el período 2022 - 2024

Gracias de antemano

11-3012-712-1412-2112-281-41-111-181-252-12-82-152-22
1 ACCEPTED SOLUTION

@danextian gracias por su ayuda. Esto es muy útil

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Hola @HarryB

La siguiente fórmula es un ejemplo de tabla de calendario DAX. Esta es una tabla calculada.

Calendar =
VAR __MIN =
    DATE ( 2022, 1, 1 )
VAR __MAX =
    DATE ( 2024, 12, 31 )
VAR __BASE =
    CALENDAR ( __MIN, __MAX )
VAR __RESULT =
    ADDCOLUMNS (
        ADDCOLUMNS (
            __BASE,
            "Year", YEAR ( [Date] ),
            "Month Long", FORMAT ( [Date], "mmmm" ),
            "Month Short", FORMAT ( [Date], "mmm" ),
            "Month Number", MONTH ( [Date] ),
            "Month and Year", FORMAT ( [Date], "mmm-yy" ),
            "YYYYMM", FORMAT ( [Date], "YYYYMM" ),
            "Quarter", "Q" & QUARTER ( [Date] ),
            "Day of Week Long", FORMAT ( [Date], "dddd" ),
            "Day of Week Short", FORMAT ( [Date], "ddd" ),
            "Day Sort", WEEKDAY ( [Date], 1 ),
            "Week of Year", WEEKNUM ( [Date] ),
            "Week Ending Saturday",
                VAR __DAY =
                    WEEKDAY ( [Date] ) - 7
                RETURN
                    [Date] - __DAY,
            "Week Ending Wednesday",
                VAR __DAY =
                    WEEKDAY ( [Date] ) - 4
                RETURN
                    [Date] - __DAY
        ),
        "Week Starting Thursday", [Week Ending Wednesday] - 6
    )
RETURN
    __RESULT

danextian_0-1709076368072.png

@danextian gracias por su ayuda. Esto es muy útil

Bienvenido. Por favor, acepte mi respuesta como solución.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors