Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Masked Data getting added up

Hi Team,

i ran into a situation where i had to mask the account Number and display the masked account number against the balance available for them. 

 

How the data is actually before masking: 

 

Account Number

Account ID

Balance

111234

1

10

121235

2

20

131234

3

30

 

Output:

Account Number

Account ID

Balance

XX1234

1

10

XX1235

2

20

XX1234

3

30

 

After Masking the acoount Number for Account ID 1 and 3 looks same and gets adds up and the visual is now depicting wrong data

 

 How to overcome this situation. 

 

Thanks in Advance

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    You can try my calculated column to mask the data. It distinguishes Account Number by adding a space after it.

    Masked Account Number =
    "XX" & RIGHT ( [Account Number], 4 )
        & REPT ( " ", RANKX ( 'Table', 'Table'[Account Number],, ASC, DENSE ) )

     

    Then Account ID 1 and Account ID 3 will not be merged.

     

    You can check more details from here.

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

4 Replies

  • dedelman_clng's avatar
    dedelman_clng
    Community Champion

    Hi Anonymous  - this is by no means "pretty" or "elegant", but here's one possible workaround.

     

    Change the bar chart to a matrix, and add Acct ID (or Acct Number - something unique) as a second row header.

     

     

    Go to Column Headers, and turn off Word Wrap, then shrink Acct ID column down to nothing.

    Under Style, choose "None"

    Under Row Headers, turn off "Stepped Layout" and "+/- icons"

    Under Field Formatting, set "Alignment" to "Left"

    Under Conditional Formatting, add "Data Bars" for balance. You may use the default settings.

     

    Here is the output. Not really a bar chart any more, but it might do the trick

     

     

    Hope this helps

    David

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    You can try my calculated column to mask the data. It distinguishes Account Number by adding a space after it.

    Masked Account Number =
    "XX" & RIGHT ( [Account Number], 4 )
        & REPT ( " ", RANKX ( 'Table', 'Table'[Account Number],, ASC, DENSE ) )

     

    Then Account ID 1 and Account ID 3 will not be merged.

     

    You can check more details from here.

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous 

      we are receiving masked data so we need not add XX in the start. 

      I just changed the DAX a little and i was able to get the solution 🙂

       

      Calculated_Column :=( [Account_NO] & REPT ( " ", RANKX ( 'TableName', 'TableName'[Account_ID],, ASC, DENSE )))

       

      Hope this is correct !

      Thanks for guiding 🙂