cancel
Showing results for
Did you mean:
Highlighted
Regular Visitor

## 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

Accepted Solutions
Community Support Team

## Re: compare first week of current quarter with first week of last quarter in PowerBI

Hi @Ani91,

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 () )```

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.
Community Support Team

## Re: compare first week of current quarter with first week of last quarter in PowerBI

Hi @Ani91,

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 () )```

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.