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

SLICER : Hiding datalist based on the mesure result

Hi, 

 

I was wondering if someone knows if there is an option/way to hide the datalist in a slicer for null or blank results for mesures. 

 

I have 2 tables on my dataset : 

- Payroll: that has employee info (payroll number, cost centre, Gender, Hire date, End date, ...) 

- Cost centre: That has all possibles cost centres and the detials (Activity, Depot, Business Unit, Cluster...)

 

I have as slicer Activity which is a column of the cost centre table, and I'd like to hide the Activity datalist based on the dataset, as i dont have any cost centre now in the payroll tab that is linked to IM activity for example, but i can have in the future. 

 

PBIX that i am working on :  https://www.dropbox.com/s/5r8dr9fmo4enox4/TEST.pbix?dl=0 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rich_coutinho Regular Visitor
Regular Visitor

Re: SLICER : Hiding datalist based on the mesure result

I've found the soluction. 

 

I have worked on the PowerQUERY and added an interlaced columns with the Cost centre Info on the PAYROLL table. 

 

Now I am using the cost centre info from the PAYROLL Table. 

3 REPLIES 3
Community Support Team
Community Support Team

Re: SLICER : Hiding datalist based on the mesure result

Hi @Rich_coutinho,


Nope, it is impossible to use measure to affect source of slicer.

 

Maybe you can try to setup RLS with username to dynamic filter source data.

RLS with UserName()

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
Rich_coutinho Regular Visitor
Regular Visitor

Re: SLICER : Hiding datalist based on the mesure result

Hi @v-shex-msft, thanks for reply. 

 

 But it's not what I am after. 

 

what I am looking for is a way to hide the option that is availabe on the slicer based on another column. 

 

As you can see on the Pbix example, I have 3 tables: 

 

- Payroll : with all infor regarding employees 

- Cost centre: All cost centres that we have in place in the company 

- Calendar: Dinamic calendar created with DAX. 

 

On the Cost centre list I have all possible cost centres, and I am using the Cluster Column as one of the slicers, but in my Payroll tab, I am not using all the cost centres, and what I'd like to do is to hide the Cluster option for the non used cost centres. 

 

Example: on my cost centre tab There is a cost centre 25IM5750ZG that is not listed on the Payroll tab, so I dont wanna make available on the slicer the IM cluster that is linked with this cost centre. 

Rich_coutinho Regular Visitor
Regular Visitor

Re: SLICER : Hiding datalist based on the mesure result

I've found the soluction. 

 

I have worked on the PowerQUERY and added an interlaced columns with the Cost centre Info on the PAYROLL table. 

 

Now I am using the cost centre info from the PAYROLL Table.