Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi!
I have a dataset with order rows, with a unique ID for each order. I want to be able to create a column/tag for each orderID with a designated order value range.
See below for how the dataset looks like and what I would like to achieve.
Any ideas?
Solved! Go to Solution.
Hi @ErikOmni ,
Please try below steps:
1. below is my test table
Table:
2. create a measure with below dax formula
Order Range =
VAR cur_sale =
CALCULATE (
SUM ( 'Table'[Sales] ),
'Table'[OrderID] = SELECTEDVALUE ( 'Table'[OrderID] )
)
RETURN
SWITCH (
TRUE (),
cur_sale > 1000, ">1000",
cur_sale > 600
&& cur_sale < 1000, "600-1000",
cur_sale < 600, "<600"
)
3. add a table visual with fields and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ErikOmni ,
Please try below steps:
1. below is my test table
Table:
2. create a measure with below dax formula
Order Range =
VAR cur_sale =
CALCULATE (
SUM ( 'Table'[Sales] ),
'Table'[OrderID] = SELECTEDVALUE ( 'Table'[OrderID] )
)
RETURN
SWITCH (
TRUE (),
cur_sale > 1000, ">1000",
cur_sale > 600
&& cur_sale < 1000, "600-1000",
cur_sale < 600, "<600"
)
3. add a table visual with fields and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Create measures like below,
Order Value = SUM(tablename[Sales])
Order Range = SWITCH(
TRUE(),
[Order Value] > 1000, "> 1000",
AND([Order Value] > 600, [Order Value] < 1000),"600-1000",
"< 600"
)
@Anonymous Hi! Sorry for late reply. The solution worked, however, I realized I need it to be column to allow me to track YoY development into different buckets.
This formula give me a circular reference warning when I try to apply it as a measure.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
86 | |
85 | |
84 | |
67 | |
49 |
User | Count |
---|---|
131 | |
110 | |
97 | |
71 | |
67 |