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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

compare first week of current quarter with first week of last quarter in PowerBI

Hi Team,

 

Greetings!!

I need to compare first week of current quarter with first week of last quarter in PowerBI and display the same using Clustered Column Chart.

Can you please guide me with this?

 

For example:

I want to compare 1st week of current quarter (i.e. Jan-Mar 2018 ) and 1st week of last quarter (i.e. Oct-Dec 2017).

 

Thank you so much in advance.

 Regards,

Ani91

 

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

I think the point here is how to find the first week of the Quarter. You can check out the demo here.

1. What's the first week of the quarter? In other words, does it start from the first day of the quarter?

2. Add a new column like this to identify the first week.

FirstWeekOfQuarter =
VAR firstweek =
    CALCULATE (
        MINX (
            FILTER (
                CALCULATETABLE (
                    SUMMARIZE (
                        'Calendar',
                        'Calendar'[Quarter],
                        'Calendar'[Week],
                        "QWDays", COUNT ( 'Calendar'[Week] )
                    ),
                    ALLEXCEPT ( 'Calendar', 'Calendar'[Quarter], 'Calendar'[Week] )
                ),
                [QWDays] = 7
            ),
            [Week]
        ),
        ALLEXCEPT ( 'Calendar', 'Calendar'[Quarter] )
    )
RETURN
    IF ( firstweek = [Week], firstweek, BLANK () )

compare_first_week_of_current_quarter_with_first_week_of_last_quarter_in_Power_BI

 

 

Best Regards,

Dale

Community Support Team _ Dale
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

1 REPLY 1
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

I think the point here is how to find the first week of the Quarter. You can check out the demo here.

1. What's the first week of the quarter? In other words, does it start from the first day of the quarter?

2. Add a new column like this to identify the first week.

FirstWeekOfQuarter =
VAR firstweek =
    CALCULATE (
        MINX (
            FILTER (
                CALCULATETABLE (
                    SUMMARIZE (
                        'Calendar',
                        'Calendar'[Quarter],
                        'Calendar'[Week],
                        "QWDays", COUNT ( 'Calendar'[Week] )
                    ),
                    ALLEXCEPT ( 'Calendar', 'Calendar'[Quarter], 'Calendar'[Week] )
                ),
                [QWDays] = 7
            ),
            [Week]
        ),
        ALLEXCEPT ( 'Calendar', 'Calendar'[Quarter] )
    )
RETURN
    IF ( firstweek = [Week], firstweek, BLANK () )

compare_first_week_of_current_quarter_with_first_week_of_last_quarter_in_Power_BI

 

 

Best Regards,

Dale

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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