admin管理员组文章数量:1130191
I am required to put customers into separate buckets. so if the revenue trend for 2g devices and/or 3g devices revenue trend is increasing then put in option a etc. I have 4 different buckets and then an unclassified. This uses a SWITCH but I am finding that customers are being put into multiple buckets. For example customer A has the following revenue trends - 2g devices increasing, 3g devices decreasing, 4g devices increasing and 5g devices increasing. As one of the 2g or 3g is increasing it should be put in bucket A 2g/3g increasing, but it is also being put into 2g/3g decreasing, 4g/5g increasing. Therefore causing an overlap
Customer Bucket =
SWITCH(
TRUE(),
-- Bucket 1: 2G/3G Increasing (Highest Priority)
OR(
[2G Revenue Trend] = "Increasing",
[3G Revenue Trend] = "Increasing"
), "2G/3G Increasing",
-- Bucket 2: 2G/3G Decreasing but 4G/5G Increasing
AND(
OR([2G Revenue Trend] = "Decreasing", [3G Revenue Trend] = "Decreasing"),
OR([4G Revenue Trend] = "Increasing", [5G Revenue Trend] = "Increasing")
), "2G/3G Decreasing, 4G/5G Increasing",
-- Bucket 3: 2G/3G and 4G/5G Decreasing
AND(
OR([2G Revenue Trend] = "Decreasing", [3G Revenue Trend] = "Decreasing"),
OR([4G Revenue Trend] = "Decreasing", [5G Revenue Trend] = "Decreasing")
), "2G/3G and 4G/5G Decreasing",
-- Bucket 4: 2G/3G Decreasing but 4G/5G Stagnant
AND(
OR([2G Revenue Trend] = "Decreasing", [3G Revenue Trend] = "Decreasing"),
AND([4G Revenue Trend] = "Stagnant", [5G Revenue Trend] = "Stagnant")
), "2G/3G Decreasing, 4G/5G Stagnant",
-- Default Case
"Unclassified"
)
this is the code but it is allowing customers to be in multiple which I don't want
本文标签:
版权声明:本文标题:Switch measure in PowerBI to put customers into different revenue buckets, how to avoid overlap? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736741344a1950526.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论