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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Count How Many Values Are Between Two Numbers...

I am trying to see how many counts of a specific value range between two numbers.  I am having a hard time understanding how I would count how many occrurrances are between this value range.  Take a look at the example screenshot below:

counts.PNG

Basically, I am trying to create a table filter very similar to the one I have made up here.  Is there anyway I could go about getting the count of each occurance between two numbers?

 

 

1 ACCEPTED SOLUTION
sgsukumaran
Resolver II
Resolver II

@Anonymous 

1. Create a caluclated column like

CTE Range=
SWITCH (
TRUE(),
CVE < 2.9 , "< 2.9",
CVE >= 3.0 && CVE <= 4.9, "3.0 - 4.9",
CVE >= 5.0 && CVE <= 5.9, "5.0 - 6.9",
CVE >= 7.0 && CVE <= 10.0, "7.0 - 10.0",
Blank())

2. Create a measure CTE Measure = Count(CTERange). 

3. Drop CTE Range and CTE MEasure inta table

View solution in original post

2 REPLIES 2
sgsukumaran
Resolver II
Resolver II

@Anonymous 

1. Create a caluclated column like

CTE Range=
SWITCH (
TRUE(),
CVE < 2.9 , "< 2.9",
CVE >= 3.0 && CVE <= 4.9, "3.0 - 4.9",
CVE >= 5.0 && CVE <= 5.9, "5.0 - 6.9",
CVE >= 7.0 && CVE <= 10.0, "7.0 - 10.0",
Blank())

2. Create a measure CTE Measure = Count(CTERange). 

3. Drop CTE Range and CTE MEasure inta table

Anonymous
Not applicable

Thanks - I've been searching for an answer all day. This worked perfectly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.