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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
mmace1
Impactful Individual
Impactful Individual

Bucket values, when you can't add a Calculated Column

I have a report that I've added a calculated column to, in order to bucket values. 

PmtSizeBracket = 
SWITCH (
TRUE(),
'Payment (MC Only)'[Amount] < 100, "Under $100",
'Payment (MC Only)'[Amount] < 500, "$100-$499",
'Payment (MC Only)'[Amount] < 1000, "$500-$999",
'Payment (MC Only)'[Amount] < 1500, "$1000-$1499",
'Payment (MC Only)'[Amount] < 2000, "$1500-$1999",
'Payment (MC Only)'[Amount] < 5000, "$2000-$4999",
"Over $5k"
)

 

However, I'm rebuilding this report as a Live Connection - so I can't add a calculated column to the Fact table.  

 

How can I still bucket things? 

(I do have the preview feature enabeled, such that I can add new tables alongside my live connection, if that helps. 

 

I thought of creating a new table of every distinct [Amount], then adding a calculated column to that / connecting the tables - but the # of distinct values exceeds the limit of 1M rows.)

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@mmace1 , Bucketing using a measure you need an independent table, Not sure you can get that.

 

Please check my example bucket on measure : https://www.youtube.com/watch?v=CuczXPj0N-k

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@mmace1 , Bucketing using a measure you need an independent table, Not sure you can get that.

 

Please check my example bucket on measure : https://www.youtube.com/watch?v=CuczXPj0N-k

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
mmace1
Impactful Individual
Impactful Individual


@amitchandak wrote:

@mmace1, Bucketing using a measure you need an independent table, Not sure you can get that.

 


 

Needing an independent table was my conclusion as well, and no - I can't, since the # of distinct values is too high to reference.  So the alternative is to bring in an entirely seperate query as a table...

And at this point I'll just write seperate measures for every bucket, and use that!

Thanks, just wanted to be sure I wasn't missing some obvious way. 


Hi,

One should be able to solve this with a single measure (using a disconnected table).  Share some raw data to work with.


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

Sure, thanks. 

Example file in Dropbox 

I tried doing a SUMMARIZECOLUMNS, but got a 'results of a query to external data sources has exceeded the maximum allowed size of 1M rows'.  I had a CALCULATE/FILTER on the SUMMARIZECOLUMNS, to only get the unique values I needed (about 30k), but same message.  



Hi,

While i am certain, i can solve this with a single measure, on 1 million rows even my solution will not work.


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

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors