Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap
I am new to Power BI and am learning every single day. I have a data source that is currently in the form of a 100% stacked bar chart (survey). The responses are in the form of strongly agree, agree, neutral, disagree and strongly disagree.
When I use the following measure as below, even though the respondents are more than 10, all responses below 10 gets filtered out too (eg: Disagree - 2)
Filter2 = IF
( COUNT('Responses'[ID]) < 5,
1, 0 )
I then have a filter on the filter pane where I only display the condition '0'.
Does anyone have a solution to this? I want the stacked chart to either be blank or state 'as the responses are low, no data can be displayed due to data sensitivity' Can someone please help. Thank you
Solved! Go to Solution.
Hi @flare_11 ,
Please try the following formula:
Measure =
var _percentage=DIVIDE(CALCULATE(COUNT('Table'[ID]),ALLEXCEPT('Table','Table'[Responses Type])),COUNTROWS(ALL('Table')))
return IF(COUNT('Table'[ID]) <5,0,_percentage)
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @flare_11 ,
Please try the following formula:
Measure =
var _percentage=DIVIDE(CALCULATE(COUNT('Table'[ID]),ALLEXCEPT('Table','Table'[Responses Type])),COUNTROWS(ALL('Table')))
return IF(COUNT('Table'[ID]) <5,0,_percentage)
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
Thank you very much for your immediate response.
Is there a possiblity to hide all responses (including agree and neutral in the example provided) when the outcome(no. of response ID) of selected slicers is less that 5 table ID's?
Your support is much appreciated.
Hello @flare_11 ,
can you maybe share how the tables in your data model look?
The description lets room for interpretation and that makes it harder to get to a solution.
User | Count |
---|---|
87 | |
74 | |
69 | |
58 | |
55 |
User | Count |
---|---|
40 | |
38 | |
34 | |
32 | |
30 |