Forum Discussion
How to apply Minimum Thresholds to visualizations?
- 10 years ago
Quick update on the resolution to this issue in case someone has a similar issue with a similar data format type:
Thanks to smoupre for the help offered, the solution I settled on came from the ideas that you shared, just with some tinkering to make it work for my data set.
As described in more detail in my previous post, I have data sets stored in 2 different ways:
1. Survey data in 1 row per response per person format (I have 2 data sets like this, a closed ended version and a verbatim version)
2. Demographic data in 1 row per person format
For my charts utilizing the closed ended survey information I already had a Measure that was used to calculate scores for the various charts. To activate the Minimum Threshold ability, I added an if( statement to the beginning of the calculation that only allowed the Measure to be performed if the Distinctcount of unique respondents was above my threshold of 5. It looked something like this:
Original:
Chart Measure = COUNTA('Closed'[B])/COUNTA('Closed'[C])Minimum Threshold:
Chart Measure = if(DISTINCTCOUNT('Closed'[UniqueID]) > 4, COUNTA('Closed'[B])/COUNTA('Closed'[C]), BLANK())For my tables that utilized verbatim responses, I did not have a measure created to populate the tables, I was just pulling in responses directly from the Response column of my data. To apply a Minimum Threshold, I created a new measure that was simply just a Distinctcount of RespondentID from my related Demographic Information table that had a 1:many relationship based on RespondentID. The new measure looked something like this:
Threshold Measure = DISTINCTCOUNT(DemoInfo[Respondentid])
From there, I applied the measure as a visual level filter on each verbatim chart and filtered it based on the rule that Threshold Measure > 4.
Hope this helps anyone in a similar situation.
Without your data model, difficult to answer exactly but I will give it a go.
If you have data like:
Response,Location,Date
Then, you could either create a measure like:
MyMeasureCount = COUNTA([Response])
That would be if Response is a text column let's say.
Then, if you create a visual with location in it, that should filter MyMeasureCount to each individual location and then you would set a filter for "MyMeasureCount" > 5 for example.
Alternatively, you could create a "Locations" table with a column like:
Location
Relate your fact table to this and create a column like:
MyColumnCount = COUNTX(RELATEDTABLE([FactTable]),[Response])
Same basic concept.
This could all be worthless because I have no idea about your data model.