cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bahman7210
Helper II
Helper II

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

@bahman7210 

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

@bahman7210 


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

@bahman7210 

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

 

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

smpa01
Resident Rockstar
Resident Rockstar

@bahman7210one 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

 


New Animated Dashboard: Sales Calendar


lbendlin
Super User III
Super User III

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.

bahman7210
Helper II
Helper II

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 III
Super User III

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.

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors