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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.