Forum Discussion
Create miscellaneous/other group using count below a threshold
- 4 years ago
Hi Geilisa ,
Try this:
1. Create a table used for shared axis and DO NOT create relationships between this table and your fact table.
PointGroup = UNION ( DISTINCT ( Projects[Points] ), ROW ( "Others", "Others" ) )2. Create a What-if parameter for threshold.
3. Create measures.
ModifiedCount = VAR CurPoint_ = MAX ( PointGroup[Points] ) RETURN CALCULATE ( COUNTROWS ( Projects ), Projects[Points] = CurPoint_ )ModifiedCount 2 = VAR threshold_ = [threshold Value] VAR CurPoint_ = MAX ( PointGroup[Points] ) RETURN IF ( [ModifiedCount] > threshold_, [ModifiedCount], IF ( CurPoint_ = "Others", SUMX ( FILTER ( ALLSELECTED ( PointGroup ), [ModifiedCount] <= threshold_ ), [ModifiedCount] ) ) )4. Create a visual.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi:
The other way is to Rclick the field on the right (columns with the values you want to consolidate) and choose New Group.
Here's an image you can bucket values or other fields this way.
- Geilisa4 years agoFrequent Visitor
I see this does work, but it isnt exactly what I'm looking for. Hoping to make it automatic. But yes it does work for grouping. Took me a little experimenting.
- Icey4 years ago
Community Support
Hi Geilisa ,
Try this:
1. Create a table used for shared axis and DO NOT create relationships between this table and your fact table.
PointGroup = UNION ( DISTINCT ( Projects[Points] ), ROW ( "Others", "Others" ) )2. Create a What-if parameter for threshold.
3. Create measures.
ModifiedCount = VAR CurPoint_ = MAX ( PointGroup[Points] ) RETURN CALCULATE ( COUNTROWS ( Projects ), Projects[Points] = CurPoint_ )ModifiedCount 2 = VAR threshold_ = [threshold Value] VAR CurPoint_ = MAX ( PointGroup[Points] ) RETURN IF ( [ModifiedCount] > threshold_, [ModifiedCount], IF ( CurPoint_ = "Others", SUMX ( FILTER ( ALLSELECTED ( PointGroup ), [ModifiedCount] <= threshold_ ), [ModifiedCount] ) ) )4. Create a visual.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.