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

Join 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.

Reply
Anonymous
Not applicable

How can I create a column with a range of numbers, instead of just single numbers?

I have the following data, which indicates the content inside the pages of a magazine, for example:

anonymous002_0-1646206167578.png

 

As you can see, sometimes the same content covers more than one page, so I would like to create a table in Power BI that shows the range of pages in the first column and the content shown only once in the second table. I don't think this is possible, though.

 

The result should be this:

 

anonymous002_1-1646206289557.png

 

 

 

1 ACCEPTED SOLUTION
serpiva64
Solution Sage
Solution Sage

Hi,

Try this

Page range interval =
var MinRange = MINX('Table','Table'[Page range])
var MaxRange = MAXX('Table','Table'[Page range])
var PageRangeInt = CONCATENATE(MinRange,CONCATENATE("-",MaxRange))
return
if (MinRange=MaxRange,MinRange, PageRangeInt)
 

serpiva64_0-1646208174515.png

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

View solution in original post

3 REPLIES 3
serpiva64
Solution Sage
Solution Sage

Hi,

Try this

Page range interval =
var MinRange = MINX('Table','Table'[Page range])
var MaxRange = MAXX('Table','Table'[Page range])
var PageRangeInt = CONCATENATE(MinRange,CONCATENATE("-",MaxRange))
return
if (MinRange=MaxRange,MinRange, PageRangeInt)
 

serpiva64_0-1646208174515.png

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

Anonymous
Not applicable

Many thanks for this, but please can you let me know where exactly did you input that formula? 

Anonymous
Not applicable

Oh, never mind. I figured it out. 

This actually works like a charm! Many thanks for this!  🙂 

Just one last thing. I did this and the results are now correct, however, the page ranges are not in order. The formula is placing all single pages first and then later all the intervals with more than one page separately. 

Would there be a way to fix this at all? If not it's fine, you already helped me so much anyway!  🙂 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors