Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi all,
New to this so please excuse the ignorance. Trying to create a measurement to count the number of values in the ordervalue column between 2 values for example count the number of rows between £0 - £500, £501 - £1000, £1001 – £2000 and so on. Still new to PBI so the less complicated the better
Regards,
Solved! Go to Solution.
Hi @kirkjordan
1. Create an ancillary table Thresholds (no relationships) describing the ranges:
| Range | MinVal | MaxVal |
| 0-500 | 0 | 500 |
| 500-1000 | 500 | 1000 |
| 1000-2000 | 1000 | 2000 |
make sure MinVal and MaxVal are of type number
2. Place Thresholds[Range] in a table visual
3. Place this measure in the visual
Measure =
VAR minVal_ = SELECTEDVALUE ( Thresholds[MinVal] )
VAR maxVal_ = SELECTEDVALUE ( Thresholds[MaxVal] )
RETURN
COUNTROWS (
FILTER ( Table1, Table1[ordervalue] >= minVal_ && Table1[ordervalue] < maxVal_ )
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Can you share the pbix? Or one with dummy data that reproduces the problem?
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Got it working, thanks for your help!!!
Hi @kirkjordan
1. Create an ancillary table Thresholds (no relationships) describing the ranges:
| Range | MinVal | MaxVal |
| 0-500 | 0 | 500 |
| 500-1000 | 500 | 1000 |
| 1000-2000 | 1000 | 2000 |
make sure MinVal and MaxVal are of type number
2. Place Thresholds[Range] in a table visual
3. Place this measure in the visual
Measure =
VAR minVal_ = SELECTEDVALUE ( Thresholds[MinVal] )
VAR maxVal_ = SELECTEDVALUE ( Thresholds[MaxVal] )
RETURN
COUNTROWS (
FILTER ( Table1, Table1[ordervalue] >= minVal_ && Table1[ordervalue] < maxVal_ )
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |