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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sapirmarko
Helper I
Helper I

Display Last 6 Month and Selected Month data using Date Dimension

In the Power BI report I have a Date dimension and sales fact tables. In report I have added single select monthincalender slicer that combine month& year and a line chart which should show month wise count of orders. 

 my monthincalender slicer is single select.

I want the last 6 months data along with the selected monthincalender in Month over Month chart

 

I did it that way:

 Date dimension and sales fact table are related with a date column

Measure = CALCULATE(cout(sales [sales_id]), DATESINPERIOD(‘Date’[Date], MAX(‘Date’[Date]), -6, MONTH))

 

but I still get in my chart: instead of see each month in the last 6 month data I see only for the selected month the cumulated number

sapirmarko_0-1699528796610.png

note: I don't want to create new slicer table 

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I fully understood your question, but I tried to create a sample pbix file like below.

Please chech the below picture and the attached pbix file.

I hope the below can provide an idea to create a solution for your datamodel.

 

Jihwan_Kim_1-1699529643286.png

 

Jihwan_Kim_0-1699529630558.png

 

Sales total: = 
SUM( Sales[Sales])

 

Expected result measure: = 
VAR _selectedyearmonthend =
    MAX ( 'Slicer calendar'[Month-Year sort] )
RETURN
    CALCULATE (
        [Sales total:],
        KEEPFILTERS (
            DATESINPERIOD ( 'Calendar'[Date], _selectedyearmonthend, -6, MONTH )
        )
    )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

hi thanks for your answer but I don't want to create new table because I can't change my data model

and I have a lot of other charts and measures that based on this slicer

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors