Forum Discussion
Anonymous
3 years agoNot applicable
Converting measure into calculated column
Hi, I am having issue to use measure in chart , filter visuals. Measure is giving me the correct result but I need to use it as bar chart, how to convert measure to calculated column.
Pragati11
3 years agoSuper User
HI Anonymous ,
Can you share your measure definition here please?
Anonymous
3 years agoNot applicable
Thanks for responding.
I have individaul measures where the calculation has been done and then there is a "Overall Status" measure where I am using Switch to use individual measures to return the result.
Overall Status =
SWITCH
(
TRUE(),
[Blank Type] > 0, "Template Missing",
[Missing Criteria] > 0, " Criteria Missing",
[Blank Due Date] > 0 , "Task(s) Missing",
[Overdue] > 0 , "Overdue",
[ Plan Overdue] > 0 , " Plan Overdue",
[ Plan Found] > 0 , " Planned",
[Due In 2 Weeks] > 0 , "Due in 2 Weeks",
[Due In 4 Weeks] > 0 , "Due in 4 Weeks",
[Due After 4 Weeks] > 0 , "Due after 4 Weeks",
[Incomplete] > 0, "Gateway Key Task(s) Incomplete", -- Incomplete Key Task
[Exception] > 0, "Completed-With Exception(s)",
"Completed"
)
- Anonymous3 years agoNot applicable
Hi Anonymous
You can refer to the following solution.
1.Put the status to a new table
e.g
2.Then create the measure
e.g
Switch_measure = VAR a = ADDCOLUMNS ( 'Table (2)', "judge", SWITCH ( TRUE (), [Sum] >= 10 && [Sum] < 40, "a", [Sum] >= 40 && [Sum] < 60, "b", [Sum] >= 60, "c" ) ) RETURN COUNTROWS ( FILTER ( a, [judge] IN VALUES ( 'Table'[Type] ) ) )3.Put the status and measure to the related visual
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.