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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
elliottgarner
Frequent Visitor

Restrict column based off measure (?)

I have a table in one of my reports that looks like the following:

 

ID          Response                 Category          Location

1            This is a comment    Misc                   USA

2            Another Comment   User Interface    USA

3            Random Text.....        Misc                   USA

4            More text! 🙂             Pricing                UK

etc....

 

There are other elements on the page that filter down the ID column accordingly, what I would like to do is add an element of anonymity to the visual so that no text is displayed where there are fewer than X comments being brought through.


I have managed to set a measure up which calculates whether or not data should be shown with the following:

Display = IF(DISTINCTCOUNT(Comments[Response]) < 10,0,1)

What I would like to now do is to change the response column to be something like the following PseudoCode:

NewResponse = IF([Display] = 1, Comments[Response], "Response Restricted")

But I can't seem to get a column or measure set up working, any thoughts/ideas?

 

Cheers!

6 REPLIES 6
Anonymous
Not applicable

Hi @elliottgarner,

Based on my understanding, you want to get the result as shown in the first screenshot when there are fewer than 10 comments in your original table. And when you have 10 or more comments in your original table, you want to get result as shown in the second screenshot. If that is the case, create two columns instead of measures using the following DAX.

Display1 = IF(DISTINCTCOUNT(comments[Response])<10,0,1)
Newresponse1 = IF(comments[Display1]=1,comments[Response],"Response Restricted")

2.PNG1.PNG

Thanks,
Lydia Zhang

Hey

 

Thanks for your reply - have just tried your suggestion and unfortunately I can't get it to work.

 

I think the issue I'm having is that there are other visualizations on the page that effect the number of displayed comments, and it's my understanding that a column won't update based off any filtering that happens on the report page? This train of thought was what led me to try and do it with a measure originally, as they do seem to update "on the fly".

 

Will keep playing around for now, I'm sure there's a way to get this working!

 

Cheers

 

 

Anonymous
Not applicable

Hi @elliottgarner,

 

Could you please share the PBIX file so that I can reproduce?

Thanks,
Lydia Zhang

That'd be great - I will strip out any confidential information when I'm at my computer tomorrow morning and get that sent through.

 

Is there a preferred method for sharing .pbix files, can't seem to see a way to upload files along with my post?

 

Thanks again!

Anonymous
Not applicable

Hi @elliottgarner,

You can upload PBIX file to OneDrive, and post a shared link of the file on this forum.

Thanks,
Lydia Zhang

Hi Lydia

 

The previous version of this post had a file that resembled a slightly different problem then the one described but we are now aligned, please ignore previous posts.

 

https://1drv.ms/u/s!ApizbJlu3OFMbVeLG0W6wjEBNLE

 

I've added the NewResponse1 and Display1 Columns to the Comments table. Display 1 is not changing based on the filters on the page so the text is always displayed. Doing this with a measure instead causes everything to be suppressed.

 

Thanks

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors