Forum Discussion

Suprith's avatar
Suprith
Frequent Visitor
5 years ago
Solved

DAX Measures

Hello All, 

 

I have a table visual data in the below format and trying to get the count of servers which satifies these "Range_Measure " condition. 

Please note that the columns

(Actual_Uptime% is a calculated column & Range_Measure is a measure. 

 
Actual_Uptime% = [Actual_Uptime]/[Expected_Uptime] * 100
Actual_Uptime = TOTALMTD(SUM(ServerUptime[Delta]),'Date'[DayDate]) 
Expected_Uptime = [Actual_Days Count] * 1440 
 
Delta is a column in the base table with values ranging between 1000 to 1440 ,where 1440 indicates that the server was up for an entire day. 
ServerNameActual_Uptime %Range_Measure
AB1100Above 99.99%
AB2100Above 99.99%
AB3100Above 99.99%
AB495Between 99% to 95%
AB599Between 99% to 95%
AB690Below 95%
AB775Below 95%
AB8100Above 99.99%
AB9100Above 99.99%
AB10100Above 99.99%
BC199Between 99% to 95%
BC299Between 99% to 95%
BC399Between 99% to 95%
BC490Below 95%
BC575Below 95%
BC699Between 99% to 95%
BC799Between 99% to 95%
BC899Between 99% to 95%
BC990Below 95%
BC1099Between 99% to 95%
BC1199Between 99% to 95%
BC1290Below 95%
CD1100Above 99.99%
CD2100Above 99.99%
CD3100Above 99.99%
CD4100Above 99.99%
CD5100Above 99.99%
CD6100Above 99.99%
CD795Between 99% to 95%
CD899Between 99% to 95%

 

I should be able to get the output as below through a Card visual. 

 

Range Measure

Total Count

Above 99.99%

12

Below 95%

6

Between 99% to 95%

12

 

 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Suprith ,

     

    Based on your description, I suggest you can create a calculated column and try again.

     

    1. create a calculated column named “Range_Column”.

     

    Range_Column =

    var x1='CASE'[Actual_Uptime %]

    return

    IF(

        x1<95,

        "Below 95%",

        IF(

            x1>99.99,

            "Above 99.99%",

            "Between 99% to 95%"

        )

    )

     

     

    1. Create a measure to get the count of servers.

    Total Count = COUNT(CASE[Range_Column])

     

    Result:

     

    Best Regards,

    Yuna

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Suprith ,

     

    Based on your description, I suggest you can create a calculated column and try again.

     

    1. create a calculated column named “Range_Column”.

     

    Range_Column =

    var x1='CASE'[Actual_Uptime %]

    return

    IF(

        x1<95,

        "Below 95%",

        IF(

            x1>99.99,

            "Above 99.99%",

            "Between 99% to 95%"

        )

    )

     

     

    1. Create a measure to get the count of servers.

    Total Count = COUNT(CASE[Range_Column])

     

    Result:

     

    Best Regards,

    Yuna

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • AllisonKennedy's avatar
    AllisonKennedy
    Community Champion

    Range Measure would need to be created as a calculated column in order for you to use it in a card visual in the way you want. Not sure if this post will help, but Power BI Order of Operations  is a good thing to understand inside out. 

     

    Do you have the Range Measure working successfully? Try it as a Calculated Column and see if this helps give you the results you want. Otherwise, please clarify what is working and what is NOT working so we can help better.