Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

anonymise the data

Hi,

i have request to anonymise  data in powerbi. client ask to add drop down to report to breake down report 

for example  :
if Id is selected , report shows customerid and other measures , 

if Name is selected , report shows customerid and other measures 

i wrote dax., but seems Dax can not change deminsion base on measures

 

NewColumn = IF([selection]="id" , CONVERTCustomer[id], STRING) , Customer[name])

if dropdown changed,it doesnt work

powerbi.jpg

 

data look likes:

idnamesale
1c110
2c215
3c320
4c425

 

 

 

 

 

 
 

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 

You may create a slicer table by just enter id and name in the column, and use it as slicer, and create 2 measure for id and name., the downside is you cannot hide the header of the other field. Please see my example pbix.

V-pazhen-msft_0-1611817915647.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
V-pazhen-msft
Community Support
Community Support

@Anonymous 


Without big transformation of your current model, the above method is best workaround I can think of. And it is not possible to show/hide fields or the headers with slicer/filter.

 

Best Regards

Paul Zheng _ Community Support Team

V-pazhen-msft
Community Support
Community Support

@Anonymous 

You may create a slicer table by just enter id and name in the column, and use it as slicer, and create 2 measure for id and name., the downside is you cannot hide the header of the other field. Please see my example pbix.

V-pazhen-msft_0-1611817915647.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

 

thanks is there any way to make report more pretty , hide columns base on slicer value ?

smpa01
Super User
Super User

@Anonymousone of the ways to achieve what you need will be through a use of disconnectd table attached here

 

https://drive.google.com/file/d/1sDTpiywgIeUa53zcrol2S4t_fcZqrFGN/view?usp=sharing

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
lbendlin
Super User
Super User

They don't need to have a dropdown. You think that is needed, but it is only one of many possible designs.  using "Personalize Visual"  is an alternative implementation to achieve the same goal.

Anonymous
Not applicable

Thanks for tip, but im not sure you got my question!

clinets need to have drop down filter on their report , two item is in drop down (user id , user name)

and base on what they select on drop down, report should show information ( becuase sometimes they have presentation and they need to do anonymise data)
if "user id" is selectd , chart show userid and total hours for each userid

then Client can change it to "user name" and chart show user name and total hours

 

lbendlin
Super User
Super User

That is correct, you need to do the anonymization much earlier, either in Power Query or in the data source. Depending on your intended interaction choices you will have to duplicate your data (a lot).

 

Let's say you have six users, and for each of them you want to show how they compare to "the five other users without naming names" then you need to prepare six duplicates of your data. AND you need to apply RLS.

 

If you do all this in DAX then your data is not secure, and your users can easily de-anonymize it.

Anonymous
Not applicable

alreay i have both column ID , Name

how can i change deminesion in powerbi chart!

when client change drop down, deminsion would change from ID to name or ... ?

 

Enable "Personalize visual"  preview function and teach your users how to use it. This empowers them to change the dimensions themselves.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors