Forum Discussion
Purchase price grouping
- 9 years ago
Hey,
create a column that sorts the "Purchase Price" into buckets like so
Purchase Price Buckets = SWITCH( TRUE() ,'yourtable'[Purchase Price] < 1000000, "<1m" ,'yourtable'[Purchase Price] >= 1000000 && 'yourtable'[Purchase Price] <= 3000000, " 1m - 3m" ,... , "> 10m")Then you can use this column as xaxis. Use the property as value and the aggregation function count.
Hope this gets you started
Regards
Hey,
create a column that sorts the "Purchase Price" into buckets like so
Purchase Price Buckets =
SWITCH(
TRUE()
,'yourtable'[Purchase Price] < 1000000, "<1m"
,'yourtable'[Purchase Price] >= 1000000 && 'yourtable'[Purchase Price] <= 3000000, " 1m - 3m"
,...
, "> 10m")Then you can use this column as xaxis. Use the property as value and the aggregation function count.
Hope this gets you started
Regards
- ocifci9 years agoFrequent Visitor
Hi Tom
Thank you for this. It worked perfectly!
Many thanks and have a great day! :)
OC
- TomMartens9 years ago
Super User
Welcome in the wonderful and sometimes mysterious world of Power BI
Regards
- Anonymous7 years agoNot applicable
I see your answer to the below and it's very similar to what I've come up with. The trouble I'm having is that my columns do not follow a logical sorting pattern when presented. In your example I'd want the columns to sort with <1M, then 1-3M, and so on. But when I sort my columns that data seems to just pick up the first digit. Once I get to 10M vs. 1M this causes issues.
Any suggestions on how to make this work?
Thanks in advance for any help on this