Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a matrix visualization where all columns are showing, if I show all results. If I filter, the columns disappear and this is just because no one responded with those (in this case no one responded with strongly agree or strongly disagree). I tried the show all items with no data, but that didn't work. Any ideas?
Hi @jcastr02 ,
We can also try to change the measure used in value field as following to meet your requirement:
Measure = [Previous Measure Formula] & ""
if the value used in the matrix is a percentage of column total, we can use the following measure to meet your requirement:
Measure =
VAR poct =
DIVIDE (
DISTINCT ( 'Table'[Value] ),
CALCULATE (
DISTINCT ( 'Table'[Value] ),
ALLEXCEPT ( 'Table', 'Table'[Attributes] )
),
0
)
RETURN
IF ( poct = 0, "", FORMAT ( poct, "0%" ) )
Best regards,
As I see it you have 2 possible solutions here.
1. It might be possible to adjust your measure so that it returns 0 instead of blank if there is no data. You just need to be careful doing this as it can cause performance issues in some cases.
2. Instead of using a matrix you could use a table and create 5 measures, one for each of your different responses and use those 5 measures on your table. It's hard to be sure without knowing what your data model looks like, but I'm thinking that these measures would use a pattern something like the following:
Strongly Agree % = CALCULATE( [percentage measure], table[Response] = "Strongly Agree")
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |