Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Suprith
Frequent Visitor

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

 

 

 

1 ACCEPTED SOLUTION
v-yuaj-msft
Community Support
Community Support

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%"

    )

)

 

v-yuaj-msft_0-1604483928640.png

 

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

Total Count = COUNT(CASE[Range_Column])

 

Result:

v-yuaj-msft_1-1604483928641.png

 

Best Regards,

Yuna

 

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

View solution in original post

2 REPLIES 2
v-yuaj-msft
Community Support
Community Support

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%"

    )

)

 

v-yuaj-msft_0-1604483928640.png

 

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

Total Count = COUNT(CASE[Range_Column])

 

Result:

v-yuaj-msft_1-1604483928641.png

 

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
Super User
Super User

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.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors