Forum Discussion
summarized dax
To avoid performance issues, I don't want to group it in Table; instead, I want to group it in Dax measurement.
Hi alialsayer,
You can try this method:
Measure:
Measure = SUM('Table'[Values($)])Measure 2 =
VAR _sum =
CALCULATE (
SUM ( 'Table'[Values($)] ),
ALLEXCEPT ( 'Table', 'Table'[Date], 'Table'[Name] )
)
RETURN
SWITCH (
TRUE (),
AND ( _sum >= 0, _sum < 2 ), "#DEFFEE",
AND ( _sum >= 2, _sum < 3 ), "#E044A7",
AND ( _sum >= 3, _sum < 4 ), "#744EC2",
_sum >= 4, "#E66C37"
)
Then in the CONDITIONAL FORMATTING:
There are two ways to color them:
1.
2.
Hope these help you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- alialsayer3 years agoHelper I
This is fantastic; thank you for your prompt response; however, I have a slightly different situation. First, I have to group values by date for each customer, and then I should use the bucket. I am not interested in color formatting as I will only use the bucket at the end to count how many unique customers are in each bucket matting as I will only use the bucket at the end to count how many unique customers are in each bucket. I am trying to find a way to do this in the DAX function instead of grouping values for each customer in a table to avoid performance issues.