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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sf94
Regular Visitor

Bring Selected Value from Slicer into Table Visual in Power BI

I am working in Power BI and have imported the general ledger (GL) of a company. The GL is structured with columns: JournalID, Account, Amount, and DocLine. Each JournalID has multiple rows due to double-entry bookkeeping. I have created a table with 6 rows as an example:

JournalIDDocLineAccountAmount
11101500
12200-500
21101300
22300-300
311021000
32300-1000

 

In Power BI, I have a slicer and a table visual mentioned above. The slicer allows filtering by accounts (filter as example for account 101). What I need to achieve is the following: the table should remain with exactly 6 rows (i.e., no filtering by account should occur). However, a new column should be added that has the value 1 for all JournalID's, that have the selected account in one of their rows and 0 for all JournalID's that do not have the selected account from the slicer. It is crucial that the visualisation with the table still has 6 rows. Result should look like this:

JournalIDDocLineAccountAmountMeasure
111015001
12200-5001
211013001
22300-3001
3110210000
32300-10000

 

The solution should be dynamic, meaning, when I change the account from the slicer, the results should change too. I think I can achieve it by creating a measure and stop the interaction between slicer and table visual.

Thanks for your help!
sf94

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Create a new table like

Account Slicer = DISTINCT( 'Table'[Account] )

and use this in your slicer. Do not connect it to the main table.

You can then create a new measure like

Account matches slicer =
IF (
    SELECTEDVALUE ( 'Table'[Account] ) = SELECTEDVALUE ( 'Account Slicer'[Account] ),
    1,
    0
)

Add this to a table visual using the account column from the main table, not the one from the slicer.

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

Create a new table like

Account Slicer = DISTINCT( 'Table'[Account] )

and use this in your slicer. Do not connect it to the main table.

You can then create a new measure like

Account matches slicer =
IF (
    SELECTEDVALUE ( 'Table'[Account] ) = SELECTEDVALUE ( 'Account Slicer'[Account] ),
    1,
    0
)

Add this to a table visual using the account column from the main table, not the one from the slicer.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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