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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
AtulsDream
Frequent Visitor

Sync slicer for Selected Quarter and Year in first page should be in second page.

Hello Team,

 

I have Dim_Period table which have a column i.e, Period_Desc which is combination of Qtr and Year (Ex - Q2 2020).

I have three pages in my report, In first page put Period_Desc in slicer, which will show all available values in slicer.

If we select any quarter from slicer eg: Q3 2022 in first page, In next page Slicer, it should show only three records - Q1 2022, Q2 2022, Q3 2022 (Selected Year and quarters less than selected quarter).

 

Please help here.

 

 

 

1 ACCEPTED SOLUTION
v-xuxinyi-msft
Community Support
Community Support

Hi @AtulsDream 

 

After my testing, I found that if the field used in the slicer in the other page is the same as the one in page1, it won't work, if it's a different field you can achieve the effect you want.

 

Here's the test I did.

 

My sample:

vxuxinyimsft_1-1712221343895.png

 

1. Create a calculated column as follows

Period_Desc = "Q" & QUARTER([Date]) & YEAR([Date])

 

2. Create a calculated table as the slicer

Date = VALUES('Dim_Period'[Period_Desc])

vxuxinyimsft_2-1712221454021.png

 

3. Create two measures as follow

Measure1 = 
IF (
    SELECTEDVALUE ( 'Date'[Period_Desc] ) = BLANK (),
    1,
    IF (
        LEFT ( MAX ( [Period_Desc] ), 2 )
            = LEFT ( SELECTEDVALUE ( 'Date'[Period_Desc] ), 2 )
            && RIGHT ( MAX ( [Period_Desc] ), 4 )
                = RIGHT ( SELECTEDVALUE ( 'Date'[Period_Desc] ), 4 ),
        1,
        0
    )
)

 

Measure2 = 
IF (
    SELECTEDVALUE ( 'Date'[Period_Desc] ) = BLANK (),
    1,
    IF (
        LEFT ( MAX ( [Period_Desc] ), 2 )
            <= LEFT ( SELECTEDVALUE ( 'Date'[Period_Desc] ), 2 )
            && RIGHT ( MAX ( [Period_Desc] ), 4 )
                = RIGHT ( SELECTEDVALUE ( 'Date'[Period_Desc] ), 4 ),
        1,
        0
    )
)

 

Page1:

Put the measure1 into the filter so that the visual only shows data where the measure1 is equal to 1.

vxuxinyimsft_0-1712221307387.png

 

Setting up a synchronized slicer

vxuxinyimsft_3-1712221541062.png

 

Page 2:
Put the measure2 into the filter so that the visual only shows data where the measure2 is equal to 1.

vxuxinyimsft_12-1712222295601.png

 

Result:

 

When I select the slicer for page1, the effect of page2 is as follows:

vxuxinyimsft_6-1712222027560.png

 

vxuxinyimsft_11-1712222248031.png

 

Best Regards,
Yulia Xu

 

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

3 REPLIES 3
AtulsDream
Frequent Visitor

Thank you @v-xuxinyi-msft , for the detailed information also your pbix file help me a lot to resolved the issue.

 

Thanks

AtulsDream
Frequent Visitor

Hi @v-xuxinyi-msft ,

 

Thank you so much for detailed explaination, Will try the same and get back to you.

v-xuxinyi-msft
Community Support
Community Support

Hi @AtulsDream 

 

After my testing, I found that if the field used in the slicer in the other page is the same as the one in page1, it won't work, if it's a different field you can achieve the effect you want.

 

Here's the test I did.

 

My sample:

vxuxinyimsft_1-1712221343895.png

 

1. Create a calculated column as follows

Period_Desc = "Q" & QUARTER([Date]) & YEAR([Date])

 

2. Create a calculated table as the slicer

Date = VALUES('Dim_Period'[Period_Desc])

vxuxinyimsft_2-1712221454021.png

 

3. Create two measures as follow

Measure1 = 
IF (
    SELECTEDVALUE ( 'Date'[Period_Desc] ) = BLANK (),
    1,
    IF (
        LEFT ( MAX ( [Period_Desc] ), 2 )
            = LEFT ( SELECTEDVALUE ( 'Date'[Period_Desc] ), 2 )
            && RIGHT ( MAX ( [Period_Desc] ), 4 )
                = RIGHT ( SELECTEDVALUE ( 'Date'[Period_Desc] ), 4 ),
        1,
        0
    )
)

 

Measure2 = 
IF (
    SELECTEDVALUE ( 'Date'[Period_Desc] ) = BLANK (),
    1,
    IF (
        LEFT ( MAX ( [Period_Desc] ), 2 )
            <= LEFT ( SELECTEDVALUE ( 'Date'[Period_Desc] ), 2 )
            && RIGHT ( MAX ( [Period_Desc] ), 4 )
                = RIGHT ( SELECTEDVALUE ( 'Date'[Period_Desc] ), 4 ),
        1,
        0
    )
)

 

Page1:

Put the measure1 into the filter so that the visual only shows data where the measure1 is equal to 1.

vxuxinyimsft_0-1712221307387.png

 

Setting up a synchronized slicer

vxuxinyimsft_3-1712221541062.png

 

Page 2:
Put the measure2 into the filter so that the visual only shows data where the measure2 is equal to 1.

vxuxinyimsft_12-1712222295601.png

 

Result:

 

When I select the slicer for page1, the effect of page2 is as follows:

vxuxinyimsft_6-1712222027560.png

 

vxuxinyimsft_11-1712222248031.png

 

Best Regards,
Yulia Xu

 

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.