Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Creating field parameters to filter the table

Hi , I have a table with multiple columns that I am displaying on the dashboard, like this 

 

 

By default I want to exclude unpublished courses and just show the courses where the status sis N/A or published like this 

 

 

But I also want to have a checkbox that when clicked shows the unpublished courses in the table and a slicer dropdown of courses 

like this 

 

 

I have tried creating a parameter but it just asks me to aggregate the values? 

How can I achieve this task? 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous 

    You can refer to the following sample.

    Sample data 

    1.Create a slicer table

    2.Create a measure and put the measure to the matrix visual filter.

    Measure = VAR A=COUNTROWS(FILTER('Table',[Publish/Unpublish] IN {"Published","N/A"}))
    return IF(ISFILTERED('Slicer'[CourceType]),1,IF(a>0,1,0))

    3.Create a measure and put it to the course slicer visual filter.

    Measure 2 = IF(ISFILTERED(Slicer[CourceType]),IF(SELECTEDVALUE('Table'[Publish/Unpublish]) in VALUES(Slicer[CourceType]),1,0),1)

    4.Put the column of the slicer table to the slicer visual and put the course column to the other slicer.

    Output

    When the slicer is not chosen.

     

    Choose the slicer.

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

     

     

     

2 Replies

  • That's not what field parameters are for. The work more like OLS, allowing you to selectively show columns and measures. What you want is more like RLS, and is achieved via slicers or the filter pane, from a single column.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    You can refer to the following sample.

    Sample data 

    1.Create a slicer table

    2.Create a measure and put the measure to the matrix visual filter.

    Measure = VAR A=COUNTROWS(FILTER('Table',[Publish/Unpublish] IN {"Published","N/A"}))
    return IF(ISFILTERED('Slicer'[CourceType]),1,IF(a>0,1,0))

    3.Create a measure and put it to the course slicer visual filter.

    Measure 2 = IF(ISFILTERED(Slicer[CourceType]),IF(SELECTEDVALUE('Table'[Publish/Unpublish]) in VALUES(Slicer[CourceType]),1,0),1)

    4.Put the column of the slicer table to the slicer visual and put the course column to the other slicer.

    Output

    When the slicer is not chosen.

     

    Choose the slicer.

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.