Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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

 

data look likes:

idnamesale
1c110
2c215
3c320
4c425

 

 

 

 

 

 
 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    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.

     

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

9 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.

     

    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's avatar
      Anonymous
      Not applicable

       

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

  • 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's avatar
      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 ... ?

       

      • lbendlin's avatar
        lbendlin
        Super User

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

  • Anonymous's avatar
    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

     

  • 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's avatar
    Anonymous
    Not applicable

    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