The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have a survey data on Power BI where I need to hide results if less than five answers in a group. I can use the answers as a filter with showing results when greater than 4 and this works for the different charts but it doesn't work for a open comment table.
If I use the same filtering it doesn't show any results then even if there are more than 4 answers for the survey. The case is that I need to show open comments from employees in a group when there are more than 4 answers. I have to show them also in a case where there can be less than 5 comments but greater than 4 answers in a survey (comments section was optional).
Regards,
Tero
Create a Measure to Count Responses per Group:
First, create a measure that counts the number of responses per group. Assuming you have a column named Group and each response has a unique identifier ResponseID, the measure would look like:
ResponsesPerGroup =
CALCULATE(
COUNT('SurveyData'[ResponseID]),
ALLEXCEPT('SurveyData', 'SurveyData'[Group])
)
Create a Measure to Determine Visibility:
Next, create a measure that returns 1 if the group has more than four responses:
ShowComments =
IF([ResponsesPerGroup] > 4, 1, 0)
Apply a Visual-Level Filter to the Comments Table:
In your open comments table visual, apply a visual-level filter where ShowComments is equal to 1. This will ensure that comments are only displayed for groups with more than four responses.
Note: Ensure that the Group column is included in your table visual to allow the filter to work correctly.
Hi @avenue1979 ,
What's the table looks like? With 'question' and 'answer' as column? And you want to hide the question records if count of answers for this question is less than 5?
Please share more information, it's better to show some sample data and expected result to us.
Best Regards,
Jay
Hi Jay,
thank you for your response. There are three different columns among with some department and location information columns: Answer Id, How are you feeling (scale 1-10) and then this open comment column. The open comment column is optional and therefore it can be empty.
I need to be able to restrict that when less than 5 answers, don't show possible open comments.
E.g. there are 4 responses from the IT department - do not show possible open comments.
Or there are 7 responses from the Sales department - show possible open comments even if there are less than 5 open comments.
Data is pretty sensitive and therefore can't share any sample.
Kind regards,
Tero
I want to hide when