Forum Discussion
DanJBay1978
8 years agoFrequent Visitor
create a calculated column to segment selected data based on 20/80 percent split
Hi Can anyone one assist with helping me understand how a can create a calculated column that segments the data selected into top 20% vs bottom 80% split of the selected data. Using the below exa...
- 8 years ago
Zubair_Muhammad
Community Champion
8 years ago
Try this calculated column
MyFlag_ =
VAR myref = [Reference]
VAR rowcount =
COUNTROWS ( Table1 )
VAR Top20rows =
SELECTCOLUMNS (
TOPN ( INT ( rowcount * .2 ), Table1, [Days], DESC, [Reference], ASC ),
"Ref", [Reference]
)
RETURN
IF ( myref IN Top20rows, "Top20 Percent", "Bottom80Percent" )
Zubair_Muhammad
Community Champion
8 years ago