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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
SpaneshS
Frequent Visitor

Benchmarking month as variable

Hi all,

I've requirement to compare Current month sales with Last month sales ,Last year same month sales and Benchmarking month sales.

SpaneshS_0-1626366197536.png

 

 

But Benchmarking month need to keep it as variable.we need to change the Benchmarking month whenever we required and compare with current month sales. 

 

Here Current month sales is whatever the date we selected and same thing Benchmarking month also need to show in same way.

If I do same Both data interacting.


How can I implement this ???

 

Kudos in advance!!

 

4 REPLIES 4
Anonymous
Not applicable

Hi @SpaneshS 

So what are your dynamic rules? If there are no rules, you can only set the slicer separately to filter the data of different tables and then compare them.

 

Best Regards

Community Support Team _ Ailsa Tao

Hi @Anonymous 

 

My dynamic rules are the values should be cumulative,BM should be either selective or we can make it as Top sales in that particular Financial year (march - april)

 

Anonymous
Not applicable

Hi @SpaneshS 

(1)Create a Calendar Date table as a slicer to filter data .

(2)Create measures to return the sum of the sales from previous month ,current month and last year same month .

Current month sales = CALCULATE(SUM('Table 1'[Value]),FILTER('Table 1',MONTH('Table 1'[Date])=MONTH(MAX('Date 1'[Date]) )))
Previous month sales = CALCULATE(SUM('Table 1'[Value]),FILTER('Table 1',MONTH('Table 1'[Date])=MONTH(MAX('Date 1'[Date]))-1))
current year sales = CALCULATE(SUM('Table 2'[Value]),FILTER('Table 2',YEAR('Table 2'[Date])=YEAR(MAX('Date 2'[Date])) && MONTH('Table 2'[Date])=MONTH(MAX('Date 2'[Date]))))
last year sales = CALCULATE(SUM('Table 2'[Value]),FILTER('Table 2',YEAR('Table 2'[Date])=YEAR(MAX('Date 2'[Date]))-1 && MONTH('Table 2'[Date])=MONTH(MAX('Date 2'[Date]))))

(3) Subtract the two measures separately to get the difference value

diff = [Current month sales]-[Previous month sales]

The final result is as shown :

Ailsamsft_0-1626679202816.pngAilsamsft_1-1626679202818.png

I have attached my pbix file ,you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

 

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

Hi thanks for reply

This Comparison works for fixed month for suppose Last month and last year,But I required variable kind of thing I need to select different month If it is july i need to compare with january or Feb

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors