Forum Discussion
Group column using measure or calculated column
Hi, I'm trying to group the Country into "Others" when the Actual is 0 or blank. In the example below, Cambodia should be grouped under "Others" and other countries will rename as it is.
Is there anyway I can do it in measure/calculated column?
Regards,
BK
Anonymous , if you create on based on measure then you have to do binning or segmentation based using the independent table.
Try a column like
if(sumx(filter(table, [country] =earlier([country])),[value]) = 0, "Other", "Country")
for measure
https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
https://youtu.be/CuczXPj0N-kHi Anonymous ,
Both measure and column can achieve this
Measure:
Group_measure = IF ( SUM ( 'Table'[Acutal] ) > 0, SELECTEDVALUE ( 'Table'[Country] ), "Others" )Column:
Group_column = IF ( [Acutal] > 0, [Country], "Ohters" )Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
Anonymous , if you create on based on measure then you have to do binning or segmentation based using the independent table.
Try a column like
if(sumx(filter(table, [country] =earlier([country])),[value]) = 0, "Other", "Country")
for measure
https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
https://youtu.be/CuczXPj0N-k - v-yingjl
Community Support
Hi Anonymous ,
Both measure and column can achieve this
Measure:
Group_measure = IF ( SUM ( 'Table'[Acutal] ) > 0, SELECTEDVALUE ( 'Table'[Country] ), "Others" )Column:
Group_column = IF ( [Acutal] > 0, [Country], "Ohters" )Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.