Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
HI All,
I have a requirement- when I select mar, then matrix should display data of jan, mar.
If I select apr, then display data of feb, april
If I select aug in slicer, matrix should display data of jun, aug.
What I am getting by default is just selected month. I need last 2 alternative months data.
#date #slicer #matrix #dax #powerbi #month
I think you can adapt the technique shown in https://www.sqlbi.com/articles/show-previous-6-months-of-data-from-single-slicer-selection/ for your use case.
Hi @johnt75 , I need last 2 alternative months data. If I select Mar, feb must be skipped and Jan data should be shown. Any leads on this kind of scenario?
I think you can adapt the calculation item from the article to be
Calc item =
VAR ReferenceDate =
MAX ( 'Date'[Date] )
VAR DatesToUse =
UNION (
DATESBETWEEN (
'Previous Date'[Date],
EOMONTH ( ReferenceDate, - 1 ) + 1,
EOMONTH ( ReferenceDate, 0 )
),
DATESBETWEEN (
'Previous Date'[Date],
EOMONTH ( ReferenceDate, - 3 ) + 1,
EOMONTH ( ReferenceDate, - 2 )
)
)
VAR Result =
CALCULATE (
SELECTEDMEASURE (),
REMOVEFILTERS ( 'Date' ),
KEEPFILTERS ( DatesToUse ),
USERELATIONSHIP ( 'Previous Date'[Date], 'Date'[Date] )
)
RETURN
Result
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.