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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

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:

Correct.jpg

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

 

Wrong.jpg

 How to overcome this situation. 

 

Thanks in Advance

1 ACCEPTED SOLUTION
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 ) )

4.png

 

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

5.png

 

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.

 

View solution in original post

4 REPLIES 4
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 ) )

4.png

 

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

5.png

 

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
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 🙂

dedelman_clng
Community Champion
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.

 

2020-09-14 08_45_31-Window.png

 

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

 

2020-09-14 08_49_06-Window.png

 

Hope this helps

David

amitchandak
Super User
Super User

@Anonymous , Not sure this will work you. But there is a masking solution discussed here

https://radacad.com/show-the-information-but-not-the-details-power-bi-data-masking

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.