cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Microsoft
Microsoft

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
Microsoft
Microsoft

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

Super User III
Super User III

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.


Has this post solved your problem? Please mark it as a 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.


I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 


www.excelwithallison.com

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors