Switch True function problems RRS feed

  • Question

  • System Uptime:=

    SWITCH(TRUE(), VALUES('Activities Log'[Level 1])="24/7", [24/7 Uptime],VALUES('Activities Log'[Level 2])="Extended Hours", [Core/Extended Uptime], VALUES('Activities Log'[Level 3])="Core Hours", [Core Uptime], [Core Uptime])

    I've got this measure that I want to use in a graph and have a hierarchy slicer (Level 1, Level 2, Level 3) to switch between the three different values. The idea is that when there is downtime it falls into one of the three categories (core hours, extended hours, or 24/7). When I place the other measure into the graph they are correct but then the hierarchy slicer doesn't work, so there must be something wrong with the above measure code.

    Core Uptime:=(Dates[Sum of CoreHours]-

    SUM('Activities Log'[Core Hours Down]))/Dates[Sum of CoreHours]

    The three measures are calculated like this but with extended or 24/7 instead of core.

    Is there something I am just missing with how I am operating my switch function?

    Wednesday, January 3, 2018 9:30 PM


  • HI jshinnenkamp,

    Thanks for your question.

    >>>Is there something I am just missing with how I am operating my switch function?.
    For this issue, please refer to below blog which talking about this similar issue:

    Best Regards
    Willson Yuan
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by jshinnenkamp Thursday, January 4, 2018 2:20 PM
    Thursday, January 4, 2018 6:07 AM