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

Slicer that filters rows with a blank column

Hi, I was wondering if it's possible to create a slicer that filters rows if certain column is blank? I think I could make a calculated column by using the "Create column from example" feature, but is there other ways to achieve this?

 

For example I have this type of data:

JKoivu_0-1599714640852.png

 

Could I create a slicer with two checkboxes "Show completed tasks" and "Show pending tasks", and it would filter the table based on the "Completed on" column? Also both should be allowed to be selected at the same time so that the table shows all tasks.

EDIT

I actually just tried the "Column from examples" feature to create a "Is complete" column, but it failed to find any transforms.

 

1 ACCEPTED SOLUTION
Super User IV
Super User IV

@JKoivu , best would a calculated column and a slicer on that.

Other option is create a table with thise two values (Enter data) and use the selected value for calculation

measure like

if(selectedvalue(Task[Task value]= "Show completed tasks", calculate(countrows(Table) filter(Table, not(isblank(Table[compeltedOn])))), calculate(countrows(Table) filter(Table, isblank(Table[compeltedOn]))))

 

In case you want go with column

slicer column = if( isblank(Table[compeltedOn]) , "Show completed tasks", "Show pending tasks")



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

3 REPLIES 3
Super User IV
Super User IV

@JKoivu , best would a calculated column and a slicer on that.

Other option is create a table with thise two values (Enter data) and use the selected value for calculation

measure like

if(selectedvalue(Task[Task value]= "Show completed tasks", calculate(countrows(Table) filter(Table, not(isblank(Table[compeltedOn])))), calculate(countrows(Table) filter(Table, isblank(Table[compeltedOn]))))

 

In case you want go with column

slicer column = if( isblank(Table[compeltedOn]) , "Show completed tasks", "Show pending tasks")



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Shouldn't that logic be reversed?

---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Super User IV
Super User IV

@JKoivu - Yes, in DAX you could create this column:

Slicer Column =
  IF(ISBLANK([Completed on]),"Pending","Completed")

---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors