Forum Discussion
Calculated Column in One table based on the other table in Power BI
- 5 years ago
Anonymous , Try
new column =
var _max = maxx(relatedtable(issues), isssues[Issue Priority])
return
switch(true(),isblank(_max), "Green",
_max = 5, "Red",
_max in {3,4}, "Yellow",
_max in {1,2}, "Green"
)or
new column =
var _max = maxx(relatedtable(issues), isssues[Issue Priority])+0
return
switch(true(),_max = 0, "Green",
_max = 5, "Red",
_max in {3,4}, "Yellow",
_max in {1,2}, "Green"
)
amitchandak This formula doesn not work for Project ID 4 and 5 since those projects are not available in the Issues table.
If the projects are not available in issues table, then the respective projects should have indicators as Green color.
Please help.
Anonymous , Try
new column =
var _max = maxx(relatedtable(issues), isssues[Issue Priority])
return
switch(true(),
isblank(_max), "Green",
_max = 5, "Red",
_max in {3,4}, "Yellow",
_max in {1,2}, "Green"
)
or
new column =
var _max = maxx(relatedtable(issues), isssues[Issue Priority])+0
return
switch(true(),
_max = 0, "Green",
_max = 5, "Red",
_max in {3,4}, "Yellow",
_max in {1,2}, "Green"
)