cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Khan17 Frequent Visitor
Frequent Visitor

Show blank when nothing is selected in the slicers

Hello,

 

 

Capture.PNG

From the picture above, you can see that I have used 4 slicers to calculate different things i.e.e hours, billing amount and total amount.

 

If I do not select anything, it shows this value (refer to the picture above). These values are accumulated and mean absolutely nothing, they only mislead the user. Please if someone can tell me what to do? Is there any way/option I can use where my table shows blank or nothing if nothing is selected from the slicer? Thanks.

 

P.S New to Power BI, not that good with DAX.

1 ACCEPTED SOLUTION

Accepted Solutions
v-danhe-msft Super Contributor
Super Contributor

Re: Show blank when nothing is selected in the slicers

Hi @Khan17 ,

Please set a new measure:

Please new a measure:

Measure1 =
CALCULATE ( IF ( ISFILTERED ( Table[Column] ), 1, 0 ), ALLSELECTED ( Table ) )

Add this measure to visual level filters, and set its value to 1.

1.PNG

Regards,

Daniel He

 

Community Support Team _ Daniel He
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
mtiedtke Visitor
Visitor

Re: Show blank when nothing is selected in the slicers

@Khan17 

You can try using the function hasonefilter with your slicers so if your slicers have a filter then do the calculations, otherwise return blank(). 

https://docs.microsoft.com/en-us/dax/hasonefilter-function-dax

 

something roughly like 

TotalHours = if(hasonefilter(ClientDescription[name]),Sum(TotalHours),Blank())

 

Khan17 Frequent Visitor
Frequent Visitor

Re: Show blank when nothing is selected in the slicers

Nopes, does not work. Basically, if I do not select anything from the slicer, my table should show blank but it does not. As you can see from the picture, it shows an accumulated value of something. I do not need that value if I have not selected anything!

 

 

My slicers are interlinked with each other (if that helps), for example if you choose an individual's name, the other slicers would show the parts that are only associated with the individual. 

 

 

v-danhe-msft Super Contributor
Super Contributor

Re: Show blank when nothing is selected in the slicers

Hi @Khan17 ,

Please set a new measure:

Please new a measure:

Measure1 =
CALCULATE ( IF ( ISFILTERED ( Table[Column] ), 1, 0 ), ALLSELECTED ( Table ) )

Add this measure to visual level filters, and set its value to 1.

1.PNG

Regards,

Daniel He

 

Community Support Team _ Daniel He
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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 55 members 1,198 guests
Please welcome our newest community members: