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

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
Anonymous
Not applicable

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. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

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. 

v-shex-msft
Community Support
Community Support

Hi @Anonymous,


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
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

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. 

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.