Forum Discussion
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
- AnonymousNot 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")Thanks,
Lydia Zhang- elliottgarnerFrequent Visitor
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
- AnonymousNot applicable