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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Table appears only if condition satisfies

Hey,

 

I am creating a table in power bi. I have multiple tables and will show them one by one on the same page through bookmarks and selection pane.

 

There is one tab called datatable that will contain the dataset in a table form. However, that table can be viewed by a user only if the choose a particular month year from a slicer called month year. So I need like a warning to be shown such as "Please select a month year to view the data table", and then the data table appears, showing the dataset as per the month year chosen.

 

Is there any way this can be done? Thank You!

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

Hi @Anonymous

You want have a an empty table unless a specific slicer item is chosen, right?

Create a measure

Measure = IF(CALCULATE(DISTINCTCOUNT(Table1[date]),ALLSELECTED(Table1[date]))=1,1,0)

3.png

Then add this measure to the Visual level filter and set “show item when the value is 1”.

4.png

 

best Regards

maggie

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

You want have a an empty table unless a specific slicer item is chosen, right?

Create a measure

Measure = IF(CALCULATE(DISTINCTCOUNT(Table1[date]),ALLSELECTED(Table1[date]))=1,1,0)

3.png

Then add this measure to the Visual level filter and set “show item when the value is 1”.

4.png

 

best Regards

maggie

Anonymous
Not applicable

@v-juanli-msfthey this works!  However, it does not show when multiple values of the slicer is selected. IS there any way this can be done?

Hi @Anonymous

It is a known limitaion, a workaround is to set "show items when value is" as "0" instead of 1 when you select mutiple seletions.

 

Best Regards

Maggie

Anonymous
Not applicable

@v-juanli-msft 

 

I dont think that would work for me because the datatable would appear then.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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