Forum Discussion
obriaincian
4 years agoResolver I
PowerBi - Counting Switch Statements
Hi All, I have the following measure: test = SWITCH(TRUE(), MAX(test[month])>=9&&MAX(test[month])<=12,"fall", MAX(test[month])>=1&&MAX(test[month])<=3,"winter", MAX(test[month])>=4&&MAX(test[mon...
- 4 years ago
Hi obriaincian
You can first add a table with season values in it. Just like below.
Then create the following measure to count the occurrences. [test] is your original measure.
Measure = COUNTX(FILTER(test,[test]=SELECTEDVALUE(Seasons[Season])),test[month])Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
v-jingzhang
4 years agoCommunity Support
Hi obriaincian
You can first add a table with season values in it. Just like below.
Then create the following measure to count the occurrences. [test] is your original measure.
Measure = COUNTX(FILTER(test,[test]=SELECTEDVALUE(Seasons[Season])),test[month])
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
obriaincian
4 years agoResolver I
exactly what I was looking for, thanks