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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
tomperro
Helper V
Helper V

Filter Two Visuals-Visual 1 show only selected end month Visual 2 Show Previous 12 Months (Calendar)

I have a date slicer.
I need two matrix visuals.
Visual 1 needs to show only data for the month of the selected date.

Visual 2 needs to show the previous 11 months (calendar).
Example:
Date Slicer Selcted Value = 12/10/2023
Visual 1 should show counts for the entire month of December

Visual 2 should show counts by month for Jan, Feb, Mar, etc. up until Dec.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @tomperro 

You can refer to the following solution.

Sample data 

vxinruzhumsft_0-1705632233546.png

The calendar table

vxinruzhumsft_1-1705632283367.png

Relationship

vxinruzhumsft_2-1705632306495.png

Create the following measure

Sum = CALCULATE(SUM('Table'[Value]))
Display =
VAR a =
    CALCULATE (
        SUM ( 'Table'[Value] ),
        EOMONTH ( 'Table'[Date], 0 ) >= EOMONTH ( MAX ( 'Calendar'[Date] ), -11 )
            && EOMONTH ( 'Table'[Date], 0 ) <= EOMONTH ( MAX ( 'Calendar'[Date] ), 0 ),
        CROSSFILTER ( 'Calendar'[Date], 'Table'[Date], NONE )
    )
RETURN
    a
Judge = IF([Display]<>BLANK(),1,0)

The Sum measure is to display the value affected by the slicer to retun only selected month, the display measure top return pre 12month value.

Create two matrix visual.

and put the following field to the visuals.

The first matrix

vxinruzhumsft_3-1705633087571.png

 

The second matrix

vxinruzhumsft_4-1705633128022.png

and put the judge visual to the second matrix visual filter.

vxinruzhumsft_5-1705633183169.png

 

Output

vxinruzhumsft_6-1705633234871.png

Best Regards!

Yolo Zhu

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

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @tomperro 

You can refer to the following solution.

Sample data 

vxinruzhumsft_0-1705632233546.png

The calendar table

vxinruzhumsft_1-1705632283367.png

Relationship

vxinruzhumsft_2-1705632306495.png

Create the following measure

Sum = CALCULATE(SUM('Table'[Value]))
Display =
VAR a =
    CALCULATE (
        SUM ( 'Table'[Value] ),
        EOMONTH ( 'Table'[Date], 0 ) >= EOMONTH ( MAX ( 'Calendar'[Date] ), -11 )
            && EOMONTH ( 'Table'[Date], 0 ) <= EOMONTH ( MAX ( 'Calendar'[Date] ), 0 ),
        CROSSFILTER ( 'Calendar'[Date], 'Table'[Date], NONE )
    )
RETURN
    a
Judge = IF([Display]<>BLANK(),1,0)

The Sum measure is to display the value affected by the slicer to retun only selected month, the display measure top return pre 12month value.

Create two matrix visual.

and put the following field to the visuals.

The first matrix

vxinruzhumsft_3-1705633087571.png

 

The second matrix

vxinruzhumsft_4-1705633128022.png

and put the judge visual to the second matrix visual filter.

vxinruzhumsft_5-1705633183169.png

 

Output

vxinruzhumsft_6-1705633234871.png

Best Regards!

Yolo Zhu

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

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors