Forum Discussion
cgonzalezjr
4 years agoNew Member
Calculation Group format string impacting other measures
I have run into an issue with formatting a measure not part of calculation group. If I select a calculation item (defined as SELECTEDMEASURE()) that has format string defined, the unrelated measure u...
- 4 years ago
Thanks that worked. Can you explain why/how the selection of a calulation item in slicer affects the formatting of another measure?
cgonzalezjr
4 years agoNew Member
Thanks that worked. Can you explain why/how the selection of a calulation item in slicer affects the formatting of another measure?
sturlaws
4 years agoResident Rockstar
Sure,
the slicer adds to the filter context when your measure is evaluated. And because you have filtered on the ordial of the calculation group, e.g. 2, all measures which has this as part of their filter context will be formated as [Profit prc]
Another way to solve your issue would be to change your switch-statement to something like this:
metric =
var _name = calculate(selectemeasurename()) return
switch(true(),
,_name = "Sales Total",[Sales total]
..
..
) Since you would have to hardcode the names of the measures here, I think I prefer to change how visuals interact.