Hi there,
I have been trying to create a calculated field that would combine together more fields and use it as dimension for a control field.
Background:
I am working on a dashboard that would track workdesks issues such as missing cables, power etc.
The scorecards with the correct metrics look like this. (I am pulling data from Google sheets and all the columns are boolean data (TRUE/FALSE checkmarks).
Now I am trying to create this and put it into a control.
"
CASE
WHEN Power = "TRUE" THEN "Power Missing"
WHEN Docking = "TRUE" THEN "Dock Missing"
WHEN LAN = "TRUE" THEN "LAN Missing"
WHEN Messy / Missing = "TRUE" THEN "Messy Cabling"
ELSE "Operational"
END
"
but here is the issue, the numbers are totally unaccurate
If I remove for example "LAN" part
"
CASE
WHEN Power = "TRUE" THEN "Power Missing"
WHEN Docking = "TRUE" THEN "Dock Missing"
WHEN Messy / Missing = "TRUE" THEN "Messy Cabling"
ELSE "Operational"
END
"
The numbers change again to higher but still not the real numbers
and finally if I remove 1 more line
"
CASE
WHEN Docking = "TRUE" THEN "Dock Missing"
WHEN Messy / Missing = "TRUE" THEN "Messy Cabling"
ELSE "Operational"
END
"
the numbers for Docking at least are correct
Does anyone know what could cause this change in calculations just by adding 1 or 2 parameters in the query?
Or would there be another way to achieve what I am trying to do? ( merging 4 or more columns in one query to have custom control over the displayed data and be able to filter for the particular issues)
If removing those lines matters, then I wonder if reordering the lines also matters?
If so, then could your data have multiple checkmarks per row? If that is the case, you'll have to decide what the most appropriate ordering will be. Each row will only count once in a CASE WHEN like that.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |