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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Group by Data Ranges

Hi All,

 

Need a little assistance with what I presume will require a DAX query.

 

I currently have a column named 'Charging State' with different values of battery levels ranging from 0% to 40%.

 

However, I would like to create a visualization that helps with grouping the data in the column into ranges in this format 0 - 10%. 11 - 20%, 21 - 30%, and 31 - 40%.

 

When I started writing this post I had in my mind that I would have to query a new column to assign those values in the relevant rows... I decided to create a New Measure with these DAX query, but can't still get anything meaningful from it: 

 

Measure =
SWITCH (
MIN ( 'Table'[Column2]),
1, CALCULATE (COUNTA('Unusual charging states_1(1684)'[Charging state]),FILTER ( 'Unusual charging states_1(1684)', ('Unusual charging states_1(1684)'[Charging state] > 0.00 && 'Unusual charging states_1(1684)'[Charging state] <= 0.10 ))),
2, CALCULATE (COUNTA('Unusual charging states_1(1684)'[Charging state]),FILTER ( 'Unusual charging states_1(1684)', ('Unusual charging states_1(1684)'[Charging state] > 0.10 && 'Unusual charging states_1(1684)'[Charging state] <= 0.20 ))),
3, CALCULATE (COUNTA('Unusual charging states_1(1684)'[Charging state]),FILTER ( 'Unusual charging states_1(1684)', ('Unusual charging states_1(1684)'[Charging state] > 0.20 && 'Unusual charging states_1(1684)'[Charging state] <= 0.30 ))),
4, CALCULATE (COUNTA('Unusual charging states_1(1684)'[Charging state]),FILTER ( 'Unusual charging states_1(1684)', ('Unusual charging states_1(1684)'[Charging state] > 0.30 && 'Unusual charging states_1(1684)'[Charging state] <= 0.40 ))))

 

Therefore my question is...how possible can I create a Group range slicer/selector to simplfy my large chunk of data values?

 

Thanks all 

 

@konstantinos @Sean 

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

Hi, @Anonymous 

 

This seems similar to the case of age grouping, you can refer to my response in the following thread.

Dynamic Grouping of Data in Visual Columns using Age(Values on X Axis) Slicer

 

vangzhengmsft_0-1637286798559.png


If this doesn't cover your case, please consdier sharing more details about it and posting expected result so it is clear on what needs to be implemented?  And It would be great if there is a sample file without any sesentive information here.  It makes it easier to give you a solution.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


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

Hi,

Share some data to work with.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

This seems similar to the case of age grouping, you can refer to my response in the following thread.

Dynamic Grouping of Data in Visual Columns using Age(Values on X Axis) Slicer

 

vangzhengmsft_0-1637286798559.png


If this doesn't cover your case, please consdier sharing more details about it and posting expected result so it is clear on what needs to be implemented?  And It would be great if there is a sample file without any sesentive information here.  It makes it easier to give you a solution.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.