Forum Discussion
Anonymous
6 years agoNot applicable
concat month/week
Hello,
I am trying to concat the fiscal month of the year + "," + the fiscal week of the year but the below DAX measure is not working. I am trying the replicate the below screenshot that I have from tableau. Any ideas where I am going wrong with this DAX measure?
Tableau code:
str([Fiscal Month]) + ", " + str([Fiscal Week Of Month])
DAX code thats not working:
Month/Week = CONCATENATE(SELECTEDVALUE('Invoice Date'[Fiscal Month]), CONCATENATE(",",SELECTEDVALUE('Invoice Date'[Fiscal Week of Month])))
Desired output column:
| 1,1 |
| 1,2 |
| 1,3 |
| 1,4 |
| 2,1 |
| 2,2 |
| 2,3 |
| 2,4 |
| 3,1 |
| 3,2 |
| 3,3 |
| 3,4 |
| etc. |
3 Replies
- AnonymousNot applicablehttps://dax.guide/combinevalues/
or
https://dax.guide/concatenate/
You're creating a calculated column, not a measure. SELECTEDVALUE should not be used in this context.
Also, remember that you can concatenate using the operator: &.
Best
D- AnonymousNot applicable
Thanks for the reply but the new column button is grayed out. I believe I am unable to create new columns because the data source is pulling from a sales cube. Is there a measure I can use instead of creating new column?
- AnonymousNot applicableProbably you can but I know from experience that all measures, members and actually everything you need should be defined in the cube, not outside.
Best
D