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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bhattg
Frequent Visitor

How to create a range from Column values

 Hello,

I'm looking to create a range out of the values of Lower Limit Column

The data is laid out in two columns as shown in Current Data and the Expected outcome is below it.  

 

Current Data:                                                                                 

Decile.png

Expected Outcome :

 

Decile - Expected.png

 

Thank you,

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

You should ideally be creating this as a calculated column formula in the Table (not as a measure).  Are you OK with my approach?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I tried this as Calculated column, range is not accurate. Check out my screenshot

If you are OK with my approach of creating a calculated column formula rather than a measure, then share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
vicky_
Super User
Super User

vicky__0-1685671564424.png

Range (calculated) = 
var nextValue = CALCULATE(MIN('Table'[Range]), FILTER(ALL('Table'), 'Table'[Range] > EARLIER('Table'[Range])))
return IF(nextValue > 0, 
    'Table'[Range] & " - " & nextValue,
    "> " & 'Table'[Range]
)

You can try something like the above

bhattg
Frequent Visitor

Thank you for your reply.

It does create a range but not accurate, here is my output.

Looks like the variable needs to be tied to the bucket column, so the range is locked to the adjacent bucket value.  

 

Decile.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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