Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I need to calculate week on week variance for data starting from 2018 till date. Date column includes a day of the week when the data is shared (say, 3/1/2023). Month column is calculated to indicated month of the year (January 2023). Week Rank is assigned to all weeks. The DAX is shared here for your reference and I would need to know how I can make this work.
CALCULATE(
SUM('fred_h8_banking'[Amt in Bn_CF]),
FILTER(
ALL('fred_h8_banking'[Week Rank_CF], 'fred_h8_banking'[series_title], 'fred_h8_banking'[Month], 'fred_h8_banking'[A/L], 'fred_h8_banking'[banks]),
'fred_h8_banking'[Week Rank_CF] = MAX('fred_h8_banking'[Week Rank_CF])
&& 'fred_h8_banking'[series_title] = MAX('fred_h8_banking'[series_title])
&& 'fred_h8_banking'[Month] = MAX('fred_h8_banking'[Month])
&& 'fred_h8_banking'[A/L] = MAX('fred_h8_banking'[A/L])
&& 'fred_h8_banking'[banks] = MAX('fred_h8_banking'[banks])
)
)
VAR SalesLastWeek_CF =
CALCULATE(
SUM('fred_h8_banking'[Amt in Bn_CF]),
FILTER(
ALL('fred_h8_banking'[Week Rank_CF], 'fred_h8_banking'[series_title], 'fred_h8_banking'[Month], 'fred_h8_banking'[A/L], 'fred_h8_banking'[banks]),
'fred_h8_banking'[Week Rank_CF] = MAX('fred_h8_banking'[Week Rank_CF]) - 1
&& 'fred_h8_banking'[series_title] = MAX('fred_h8_banking'[series_title])
&& 'fred_h8_banking'[Month] = MAX('fred_h8_banking'[Month])
&& 'fred_h8_banking'[A/L] = MAX('fred_h8_banking'[A/L])
&& 'fred_h8_banking'[banks] = MAX('fred_h8_banking'[banks])
)
)
RETURN DIVIDE(SalesCurrentWeek_CF, SalesLastWeek_CF, 0)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |