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
Syndicate_Admin
Administrator
Administrator

Find percentage of points that are within a range

Hello

infinitely appreciate if you can help me with the next consultation,

I have a table with the following columns, what I need is to know the percentage of the time that the temperature and humidity are in range, it would be temperature between 17 and 25 and Humidity between 40 and 60.

The two ranges of humidity and temperature have to coincide, but I do not give with the solution.

I appreciate any help.

Greetings.

In the image that is a scatter plot is reflected my doubt.

EN RANGO.JPG

ID_LECTURAID_CONTADORMEDIA_DIADATEPROBE
546127131322811/07/2021Temperature
547866131322712/07/2021Temperature
546732131232213/07/2021Temperature
548471131231914/07/2021Temperature
5461281313351911/07/2021Humidity
5478671313351312/07/2021Humidity
5467331312445813/07/2021Humidity
5484721312445814/07/2021Humidity
1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @sunnypb ,

 

Learn about how to highlight in the scatter chart, refer to

http://sqljason.com/2018/03/highlighting-scatter-charts-in-power-bi-using-dax.html

https://blog.enterprisedna.co/scatter-charts-in-power-bi-highlighting-key-points/

 

 

Or you can try to use zoom slicer to similarly highlight the value within the range you want.

Turn on the zoom slicer in Format.

8.png

 

 

 

Best Regards,

Stephen Tao

 

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

6 REPLIES 6
v-stephen-msft
Community Support
Community Support

Hi @sunnypb ,

 

Learn about how to highlight in the scatter chart, refer to

http://sqljason.com/2018/03/highlighting-scatter-charts-in-power-bi-using-dax.html

https://blog.enterprisedna.co/scatter-charts-in-power-bi-highlighting-key-points/

 

 

Or you can try to use zoom slicer to similarly highlight the value within the range you want.

Turn on the zoom slicer in Format.

8.png

 

 

 

Best Regards,

Stephen Tao

 

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

Thank you very much for the information, I will keep you in mind!!!!!, Greetings!!!!!!

Hi @sunnypb ,

 

You are welcome, if my reply is helpful to you, you can mark it as an answer, and more people will benefit.

 

 

Best Regards,

Stephen Tao

 

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

Syndicate_Admin
Administrator
Administrator

Attached image of the problem, I just want to tell what is highlighted.

Captura_rango.JPG

TheoC
Super User
Super User

Hi @Syndicate_Admin

 

I recommend using Power Query to perform following steps:

 

1. Unpivot PROBE and MEDIA_DIA columns

 

Either as a Custom Column in Power Query or a Calculated Column in Power BI Desktop:

 

2. Create a Custom Column or a Calculated Column with the conditions you require (e.g. Temperature 17 and 25 and Humidity between 40 and 60) using IF ( AND (....) and allocate Yes else No.

 

Once the above is done, you can use the count of YES divided by COUNTROWS (Table) to give you your percentage.

 

Hope this helps!

 

Theo

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Thank you for the prompt response,

I applied the following formula after doing Unpivot

RANGE = IF(AND(medias_diarias_sensores[TEMPERATURE]>17,medias_diarias_sensores[TEMPERATURE]<25),"IN RANGE")&IF(AND(medias_diarias_sensores[HUMIDITY]>40,medias_diarias_sensores[HUMIDITY]<60),"IN RANGE")
Now, how would I do the count?, I am not very expert in DAX, a thousand thanks in advance.
Greetings.

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.