The fields of "Year" and "Month"

Hello

The fields of “Year” and “Month” are divided in BAQ as shown below. As a result, monthly analysis is not available.
How do I create a new field by combining the fields “Year” and “Month”?
example) Month: 03 Year: 2021→ 03. 2021

What should I type here?

Select the data type as Varchar for Calculated Field.

Month&’.’&FiscYear

What’s the problem?

Single Quotes are wrong, Select from right side bottom tool where symbols are available.

No single quotes.
What should I do?
image

Below highlighted one is same, click on it and put dot in between them.

image

Sorry to bother you.
Even after doing that, it doesn’t work.

Whatz the issue?

The column is created, but a test error occurs.


Change the varchar length in Calculated field from 8 to 30.

For SQL you just use the + sign

Month + '  ' + FiscYear 

the single quotes in the middle are just a space, or whatever delimiter you want to be able to read it.

I would also put the year first so that sorting works in a dashboard. Otherwise you will have multiple years mixed in with the months in order.

What table is Month and FiscYear from ( Month and FiscYear look like labels, not fields) ? Are they Calculated Fields ? . Sometimes best to select from the display fields area( double click) to get correct syntax.

You can see in his earlier screen shot that they are calculated fields.

My Bad, If FiscYear is an Int , should it be str(FiscYear)

The Month and FiscYear table are Calculated Fields


The Month and FiscYear table are Calculated Fields

Have you tried Ltrim(Str(Month)) + Ltrim(Str(Year))

For some reason Str has leading blanks

October looks good. September is not.
There seems to be a difference between a two-digit number and a single-digit number.
image

@pilio.lee Calculations are just sql statements so you can just google for how to pad. Something like this should work.

Right ('00' + Month,2)
1 Like