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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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.

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