Forum Discussion
PatrickSeidl
8 years agoFrequent Visitor
Use value if entry is missing compared to another table
Hi all, I have a table with SLA information. This table, however, only contains objects with violations per every hour, not those without. The table basically looks like that: StateChanges: Ser...
- 8 years ago
- 8 years ago
Zubair_Muhammad
8 years agoCommunity Champion
Hi PatrickSeidl
My apologies for late reply
There is too much work these days in my office
Hopefully this will work
New Table =
ADDCOLUMNS (
ADDCOLUMNS (
CROSSJOIN ( ALL ( GroupTable[ServerName] ), ALL ( StateChanges[DateTime] ) ),
"Healthy Percent",
VAR mycalc =
CALCULATE (
SUM ( StateChanges[HealthyPercent] ),
FILTER (
StateChanges,
StateChanges[ServerName] = EARLIER ( [ServerName] )
&& StateChanges[DateTime] = EARLIER ( [DateTime] )
)
)
RETURN
IF ( ISBLANK ( mycalc ), 100, mycalc )
),
"Critical Percent",
VAR result =
LOOKUPVALUE (
StateChanges[CriticalPercent],
StateChanges[ServerName], [ServerName],
StateChanges[DateTime], [DateTime]
)
RETURN
IF ( ISBLANK ( result ), 0, result ),
"Warning Percent",
VAR result =
LOOKUPVALUE (
StateChanges[WarningPercent],
StateChanges[ServerName], [ServerName],
StateChanges[DateTime], [DateTime]
)
RETURN
IF ( ISBLANK ( result ), 0, result )
)Zubair_Muhammad
8 years agoCommunity Champion
- PatrickSeidl8 years agoFrequent Visitor
This is amazing, thank you so much!