power bi 之星座分析

  1. 第一步分析出月日:
    月日 = IFERROR( VALUE(FORMAT([birthday],"MMdd")),0)

  2. 获取星座:

星座 = SWITCH(TRUE(), 
[月日] >= 120 &&  [月日]<=218 ,"水瓶座",
[月日] >= 219 &&  [月日]<=320 ,"双鱼座",
[月日] >= 321 &&  [月日]<=419 ,"白羊座",
[月日] >= 420 &&  [月日]<=520 ,"金牛座",
[月日] >= 521 &&  [月日]<=621 ,"双子座",
[月日] >= 622 &&  [月日]<=722 ,"巨蟹座",
[月日] >= 723 &&  [月日]<=822 ,"狮子座",
[月日] >= 823 &&  [月日]<=922 ,"处女座",
[月日] >= 923 &&  [月日]<=1023 ,"天秤座",
[月日] >= 1024 &&  [月日]<=1122 ,"天蝎座",
[月日] >= 1123 &&  [月日]<=1221 ,"射手座",
[月日] >= 1224 ,"摩羯座",
[月日] >=11 && [月日]<=119,"摩羯座",
"未知")
阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a22698488/article/details/80354982
个人分类: sql
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭