Forum Discussion
x-axis alias on cumulative measure
- 8 years ago
Alright, i did some things. pictures at the bottom.
First of all, I created a calculated column with cumulative month values.
Then i changed the CV TFYTD measure.
Ignore the names of tables and columns*
Final resultCalc columnChanged allselected to affect entire table.
Column = IF(ArticleDeclaration[Custom]<2;"Jan"; IF(ArticleDeclaration[Custom]<3;"Jan-Feb"; IF(ArticleDeclaration[Custom]<4;"Jan-Mar"; IF(ArticleDeclaration[Custom]<5;"Jan-Apr"; IF(ArticleDeclaration[Custom]<6;"Jan-May"; IF(ArticleDeclaration[Custom]<7;"Jan-Jun"; IF(ArticleDeclaration[Custom]<8;"Jan-Jul"; IF(ArticleDeclaration[Custom]<9;"Jan-Aug"; IF(ArticleDeclaration[Custom]<10;"Jan-Sep"; IF(ArticleDeclaration[Custom]<11;"Jan-Oct"; IF(ArticleDeclaration[Custom]<12;"Jan-Nov"; "Jan-Dec" )))))))))))
Alright, i did some things. pictures at the bottom.
First of all, I created a calculated column with cumulative month values.
Then i changed the CV TFYTD measure.
Ignore the names of tables and columns*
Final resultCalc columnChanged allselected to affect entire table.
Column = IF(ArticleDeclaration[Custom]<2;"Jan";
IF(ArticleDeclaration[Custom]<3;"Jan-Feb";
IF(ArticleDeclaration[Custom]<4;"Jan-Mar";
IF(ArticleDeclaration[Custom]<5;"Jan-Apr";
IF(ArticleDeclaration[Custom]<6;"Jan-May";
IF(ArticleDeclaration[Custom]<7;"Jan-Jun";
IF(ArticleDeclaration[Custom]<8;"Jan-Jul";
IF(ArticleDeclaration[Custom]<9;"Jan-Aug";
IF(ArticleDeclaration[Custom]<10;"Jan-Sep";
IF(ArticleDeclaration[Custom]<11;"Jan-Oct";
IF(ArticleDeclaration[Custom]<12;"Jan-Nov";
"Jan-Dec"
)))))))))))
So does that meet your requirement?
Also, you may want to use the SWITCH function instead of nested IF statements. See this blog post to explain why/how
https://powerpivotpro.com/2012/06/dax-making-the-case-for-switch/