This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello
My problem is as follows:
I have data with a data assigned, with from to values that also is linked to a cost. The question I got asked is to "bin" the from to data into specific intervals with the associated costs then split according to these bins. Can this be done?
I tried the bin option but it does not split on the precise interval.
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
Try formula like below:
Create calculated column for grouping.
Bin =
SWITCH(
TRUE(),
'DataTable'[FromValue] >= 0 && 'DataTable'[FromValue] <= 10, "0-10",
'DataTable'[FromValue] > 10 && 'DataTable'[FromValue] <= 20, "11-20",
'DataTable'[FromValue] > 20 && 'DataTable'[FromValue] <= 30, "21-30",
'DataTable'[FromValue] > 30 && 'DataTable'[FromValue] <= 40, "31-40",
"Other"
)
Then create below measure:
TotalCost =
SUM('DataTable'[Cost])
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Try formula like below:
Create calculated column for grouping.
Bin =
SWITCH(
TRUE(),
'DataTable'[FromValue] >= 0 && 'DataTable'[FromValue] <= 10, "0-10",
'DataTable'[FromValue] > 10 && 'DataTable'[FromValue] <= 20, "11-20",
'DataTable'[FromValue] > 20 && 'DataTable'[FromValue] <= 30, "21-30",
'DataTable'[FromValue] > 30 && 'DataTable'[FromValue] <= 40, "31-40",
"Other"
)
Then create below measure:
TotalCost =
SUM('DataTable'[Cost])
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 29 | |
| 26 | |
| 25 | |
| 22 | |
| 13 |
| User | Count |
|---|---|
| 59 | |
| 50 | |
| 26 | |
| 20 | |
| 19 |