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
Nalini
Regular Visitor

Display only multiple rows in table and don't display anything if it has only one row in table view

Hi,

 

I have a table which has A, B, C, D, E, F columns and i have created a table view in power Bi and added some slicers to the dashoboard. So now if someone filter the A column slicers and select only one number and data has only one row for it means my table should not display anything. below i have provided the screenshot(if if filter A as 1,2,4,6,7 those data row should not display in my table view and if i filter A as 3 then it should display all those data rows in the table view). I have tired the count based on A and B it didn't work. Any one can help me on this?

 

Nalini_0-1670406214336.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @rama211976 ,

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

1. Create a dimension table as below

A = VALUES('Table'[A])

yingyinr_0-1670482428464.png

2. Create a measure as below to get it:

Flag = 
VAR _selas =
    ALLSELECTED ( 'A'[A] )
VAR _taba =
    SELECTEDVALUE ( 'Table'[A] )
VAR _counta =
    CALCULATE (
        COUNT ( 'Table'[A] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[A] = _taba )
    )
RETURN
    IF ( _counta = 1, 0, IF ( _taba IN _selas, 1, 0 ) )

yingyinr_1-1670482552049.png

If the above one can't help you get the desired result, please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @rama211976 ,

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

1. Create a dimension table as below

A = VALUES('Table'[A])

yingyinr_0-1670482428464.png

2. Create a measure as below to get it:

Flag = 
VAR _selas =
    ALLSELECTED ( 'A'[A] )
VAR _taba =
    SELECTEDVALUE ( 'Table'[A] )
VAR _counta =
    CALCULATE (
        COUNT ( 'Table'[A] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[A] = _taba )
    )
RETURN
    IF ( _counta = 1, 0, IF ( _taba IN _selas, 1, 0 ) )

yingyinr_1-1670482552049.png

If the above one can't help you get the desired result, please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

amitchandak
Super User
Super User

@Nalini , If you create a slicer on column A, it should filter whatever is selected in the slicer.

 

Not very clear, what is not working for you.

 

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.