Forum Discussion
If measure for range
Hi I'm tryint to write a measue that would fill in a range based on fees. I have a column titled fees and another titled range. I posted an image of what i'm trying to get it to look like.
the categories i need is <10K, 10K-50K, 50K-100K, 100K-250K, 250K-500K, 500K-1M, 2M+
Hi Anonymous ,
Please try the following formula:
Measure = VAR _SUM = SUM ( 'Table'[Value] ) RETURN SWITCH ( TRUE ( ), _SUM < 10000, "<$10K", _SUM >= 10000 && _SUM < 50000, "$10K - $50K", _SUM >= 50000 && _SUM < 100000, "$50K - $100K", _SUM >= 100000 && _SUM < 250000, "$100K - $250K", _SUM >= 250000 && _SUM < 500000, "$250K - $500K", _SUM >= 500000 && _SUM < 1000000, "$500K - $1M", _SUM >= 1000000 && _SUM < 2000000, "$1M - $2M", "$2M+" )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
Anonymous , For the measure you have to dynamic bucketing using an independent table.
Refer to the blog or video
Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626
Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k - v-kkf-msft
Community Support
Hi Anonymous ,
Please try the following formula:
Measure = VAR _SUM = SUM ( 'Table'[Value] ) RETURN SWITCH ( TRUE ( ), _SUM < 10000, "<$10K", _SUM >= 10000 && _SUM < 50000, "$10K - $50K", _SUM >= 50000 && _SUM < 100000, "$50K - $100K", _SUM >= 100000 && _SUM < 250000, "$100K - $250K", _SUM >= 250000 && _SUM < 500000, "$250K - $500K", _SUM >= 500000 && _SUM < 1000000, "$500K - $1M", _SUM >= 1000000 && _SUM < 2000000, "$1M - $2M", "$2M+" )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.