Forum Discussion

fabiocovre's avatar
fabiocovre
Advocate I
8 years ago
Solved

Create a ranking for sensitive data

Hello,   I'm working with medical data, and due that, I cannot show the name of the people in my report.   I have this following table in my dashboard:   Name - Cost John - 50,000 Mark - 20,0...
  • v-yuta-msft's avatar
    v-yuta-msft
    8 years ago

    Hi fabiocovre,

     

    Create a calculate column using DAX like below:

    Total Cost = CALCULATE(SUM(Table1[Cost]), FILTER(Table1, Table1[Name] = EARLIER(Table1[Name])))

    Then modify the rank measure like this:

    Rank = RANKX(ALLSELECTED(Table1), CALCULATE(MAX(Table1[Total Cost]), ALLEXCEPT(Table1, Table1[Name])), , DESC, Dense)

       

     

    In addtion, I'm afraid the Name column can't be removed because allselect() function are based on the Name column.

     

    PBIX here: https://www.dropbox.com/s/utytv44dtowsqh0/Create%20a%20ranking%20for%20sensitive%20data.pbix?dl=0

     

    Regards,

    Jimmy Tao