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
You can use this Calculated Table...I believe
From the Modelling Tab>>NEw Table
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", 100 - [Healthy Percent]
)- Zubair_Muhammad8 years agoCommunity Champion
- PatrickSeidl8 years agoFrequent Visitor
Hi,
this is awesome, thank you so much.
All the best,
Patrick
- PatrickSeidl8 years agoFrequent Visitor
Hi Zubair_Muhammad,
now it's getting a bit more complicated...
In the StateChanges I have "Warning Percent" as well (I did not mention yet for keeping it simple but probably that wasn't a good idea). So, simply calc 100 - "Healthy Percent" does not help and my other calculations (SUM, AVG) take the same value for all rows. No idea how to move on from here.
Probably you could help again?
Thanks again and all the best from Austria,
Patrick
- Zubair_Muhammad8 years agoCommunity Champion