Forum Discussion
LaxmiNayak
3 years agoFrequent Visitor
Dynamic count based on bucket segmented values
Hi All, Am trying to create below attached view in Power Bi which is doable in excel. I have two measures count of orders 'Count' and for Revenue as 'Value'. Now I want to club these 'Count' ba...
Anonymous
3 years agoNot applicable
Hi LaxmiNayak ,
Please create a measure as below to get it:
segment (Bucket) =
SWITCH (
TRUE (),
[Count] = 2342
|| Revenue[Value] < 5000, "<$5k",
[Count] = 1404
|| ( Revenue[Value] > 5000
&& Revenue[Value] <= 50000 ), "$5k-$50k",
[Count] = 128
|| ( Revenue[Value] > 50001
&& Revenue[Value] <= 100000 ), "$50k-$100k",
[Count] = 178
|| Revenue[Value] > 100000, "$100k+"
)
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards