Forum Discussion
sapirmarko
2 years agoHelper 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 wis...
Jihwan_Kim
2 years agoSuper 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.
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 )
)
)
sapirmarko
2 years agoHelper I
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