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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.