The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone! I am running into a problem with my data visualization.
Context: I am trying to display survey results with a 100% stacked bar chart. The responses use a Likert Scale (1.Strongly Disagree to 5. Strongly Agree). I have various filters as well with info such as Age Range, Race, Gender, etc. In effort to protect user identities, I am supressing cell counts of less than 5. Essentially if a question gets less than 5 responses then it won't show up on the dashboard. This is so we can protect the identities of responses that come from smaller demographic groups (i.e. Latinx women, Men 50+ age, etc.)
Problem: I created a meaure in my data viz to supress cell count and applied it as a filter to my visualizations, but it messes up my charts. For some questions, I have received more than 5 responses TOTAL, but the total is made up of varying Likert responses that equal less than 5 for each Likert choice. For example, I have a question that has a total of 9 responses, but with the filter applied the stacked bar chart only displays the Likert choice Strongly Agree that received 5 or more responses. I've attached two photos to demonstrate the problem they are displaying the responses from the same question, one without the filter and one with the filter.
The measure is Supress_Cell = DISTINCTCOUNT('DataTable'[form_submission])
and the filter I apply with my Supress_Cell measure and is show items when the value is greater than or equal to 5
How do I edit my Supress_Cell measure to account for the Likert responses themselves?
*Can provide more detail if necessary!*
Solved! Go to Solution.
give this a try?
Supress_Cell =
VAR qst =
SELECTEDVALUE ( [question] )
VAR result =
CALCULATE (
DISTINCTCOUNT ( 'DataTable'[form_submission] ),
'DataTable'[question] = qst,
REMOVEFILTERS ( 'DataTable'[Likert scale] )
)
RETURN
IF ( result >= 5, 1 )
you can then use this as a flag on your visual, place on the filter area of the visual and select 1
Proud to be a Super User!
give this a try?
Supress_Cell =
VAR qst =
SELECTEDVALUE ( [question] )
VAR result =
CALCULATE (
DISTINCTCOUNT ( 'DataTable'[form_submission] ),
'DataTable'[question] = qst,
REMOVEFILTERS ( 'DataTable'[Likert scale] )
)
RETURN
IF ( result >= 5, 1 )
you can then use this as a flag on your visual, place on the filter area of the visual and select 1
Proud to be a Super User!
This worked perfectly! Thank you so much! I am very new to this, if you have time I'd love to get a breakdown of what you did here? Thanks again 🙂