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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
quynhpham1955
Regular Visitor

Filter table based on Slicer

Hi,

 

I have a set of data from this link http://quynhpham.net/temp/sample.xlsx which includes of 6 worksheets.

"Actual" and "Budget" are from database and updated every month.

"Jul", "Aug", "Sep" and "Oct" are reports generated from Power BI based on Slicer selection.

 

I would like to use Power BI with visual Slicer and a visual table or matrix with requirement as below.

If select Jul from Slicer then the visual table will show data as worksheet "July", similarly if Aug selected then the visual table is auto reload with data as in worksheet "Aug".

 

Thanks

 

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

Hi @quynhpham1955 ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1. Create a month dimension table

vyiruanmsft_0-1701067967653.png

2. Append the table

vyiruanmsft_2-1701068006335.png

3. Create a measure as below to get the amount

SAmount = 
VAR _selmonth =
    SELECTEDVALUE ( 'Months'[Month] )
RETURN
    CALCULATE (
        SUM ( 'Append1'[amount] ),
        FILTER (
            'Append1',
            IFERROR ( SEARCH ( _selmonth, 'Append1'[Month], 1, 0 ), 0 ) > 0
        )
    )

4. Create a table visual

vyiruanmsft_3-1701068134738.png

Best Regards

Community Support Team _ Rena
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
v-yiruan-msft
Community Support
Community Support

Hi @quynhpham1955 ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1. Create a month dimension table

vyiruanmsft_0-1701067967653.png

2. Append the table

vyiruanmsft_2-1701068006335.png

3. Create a measure as below to get the amount

SAmount = 
VAR _selmonth =
    SELECTEDVALUE ( 'Months'[Month] )
RETURN
    CALCULATE (
        SUM ( 'Append1'[amount] ),
        FILTER (
            'Append1',
            IFERROR ( SEARCH ( _selmonth, 'Append1'[Month], 1, 0 ), 0 ) > 0
        )
    )

4. Create a table visual

vyiruanmsft_3-1701068134738.png

Best Regards

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.