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
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
Select the data type as Varchar for Calculated Field.
Month&’.’&FiscYear
Single Quotes are wrong, Select from right side bottom tool where symbols are available.
No single quotes.
What should I do?
Whatz the issue?
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.
My Bad, If FiscYear is an Int , should it be str(FiscYear)
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.
@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)