Forum Discussion
dynamic grouping question.
- Anonymous8 years ago
Hmmm, I may misunderstanding your case since I don't know your data structure. My suggestion is provided based on the following scenario.
There is a Product -> sales table like this. One product could have several sales value.
Then created a new table using the following Dax
Total Sales = GROUPBY('Product','Product'[Product],"Total Sales",SUMX(CURRENTGROUP(),'Product'[Sales]))And then, created a new column to tag the product based on the total sales number
Sales Range = IF([Total Sales]<30000, "Low Sales", "High Sales")
After that, you could create a chart to show the High/Low Sales products.
I made some progress. I created a new measure called Group.
Group = if((calculate(sum(Source[Sales]), groupby(Source, Source[product])) >= 30000), "High", "Low")
It prints now below:
Product Total Sale Group
100 30000 High
101 20000 Low
102 50000 High
:
:
Now, I need to create a dynamic group that puts Products into either High or Low group sales. Every product will need to fall into one of these 2 categories.
Thanks.
- Anonymous8 years agoNot applicable
Why not just using a slicer chart to achieve this?
- ppgandhi1118 years ago
Helper I
How would this work Jessica? The High Sale and Low Sale are not connected with the Product table anyhow. The post I had shows that they are coming from the measure called "Group".
Can you please elaborate?