TM1 should display values in /1000 format.
-
- Posts: 5
- Joined: Mon Jul 03, 2023 8:50 am
- OLAP Product: IBM TM1
- Version: 2.0.9.15
- Excel Version: Version 2208 Build 1
TM1 should display values in /1000 format.
Hello Everyone,
I need some help related to data formatting.
We re loading the data values form SQL, and data load is working as excepted.
Now user wants to see the values in TM1 in /1000 format.
Ex - of the cube view data is displaying as 4,880,505 - user wants to see value as /1000.
4880505 /1000 = 4881
I have updated the TI process with the below line of code
nValue1= nAmount1\1000; and by using cellputn i am loading the nValue into cube.
but the problem i am facing is, when i am adding that code, values are not matching, it seems may be because of dimension consolidation. i am attaching the dimension structure.
but with normal load values are matching.
please give me some idea.
Any custom format we can use? if so please suggest.
Thank you in advance.
--------------------------------------------------------
asciioutput('E:\TM1Data\CE DM\Extracts\financial'| vAdjType |''|vPostingPeriod|'.csv', vItem, vPostingLevel, vConsolidationUnit, vFunctionalArea, vProfitCenter, vFinDataVersion, vBrandFamily
, vProductType, vPLLine, vAdjustmentType, vPostingPeriod,NumberToString(vAmount),NumberToString(vAmount1));
vItem=SUBST(vItem,4,5);
vAccount='In'| vItem;
vConsolUnit=SUBST(vConsolidationUnit,4,4);
vFunctArea=vFunctionalArea;
vSKUMarket='In'|SUBST(vProfitCenter,6,5);
vBrand = vBrandFamily;
vAdjType=IF(StringToNumber(vAdjustmentType)<10,'000'|vAdjustmentType,'00'|vAdjustmentType);
vProfitCenter1=SUBST(vProfitCenter,6,5);
vProfitCenter = TRIM(vProfitCenter1);
vPostingPeriod=IF(StringToNumber(vPostingPeriod)<10,'M0'|vPostingPeriod,'M'|vPostingPeriod);
vValue=vAmount;
vValue1=vAmount1;
vMarket = ELPAR('CE DM SKU Market PLAN', vProfitCenter,1);
IF( StringToNumber( vPostingLevel ) < 10 );
vPostingLevel = '0' | vPostingLevel;
ENDIF;
IF(vPLLine @= 'PRIMARY PRODUCION COST');
vPLLine = 'PRIMARY PRODUCTION COST';
ENDIF;
IF( vValue = 0 & vValue1=0 );
ItemSkip;
ENDIF;
IF(LONG(vProfitCenter)>4);
ITEMSKIP;
ENDIF;
IF(DIMIX('CE DM P&L Account', vAccount) = 0);
ITEMSKIP;
ENDIF;
vPCBrand = vProfitCenter | ' ' | vBrand;
vInPCBrand = 'In'|vPCBrand;
ATTRPUTS( vProfitCenter, 'CE DM Profit Center', vPCBrand, 'Market Parent');
ATTRPUTS( vBrand, 'CE DM Profit Center', vPCBrand, 'Brand Parent');
sBrandWithSameParent = vBrand | vBrand;
IF(DIMIX('CE DM Profit Center', sBrandWithSameParent)>0);
ATTRPUTS( sBrandWithSameParent, 'CE DM Profit Center', vPCBrand, 'Brand Parent');
ENDIF;
ATTRPUTN( 1, 'CE DM SKU Market', vInPCBrand, 'PCBrandDummy');
#=====================
# Define Cube Dimensions
#=====================
vDim01=pScenarioTarget;
vDim02=vPostingPeriod;
vDim03=vAdjType;
vDim04=vPostingLevel;
vDim05=ATTRS('CE DM Scenario',pScenarioTarget,'FXRateType');
vDim06=vConsolUnit;
vDim07='SDxx';
#vDim08=vSKUMarket;
vDim08=vInPCBrand;
vDim09=vPCBrand;
vDim10='CC00000';
vDim11='InternalOrder01';
vDim12=vFunctArea;
vDim13=vAccount;
vDim14=vPLLine;
vDim15='BaseValue';
#=====================
# Update attributes
#=====================
AttrPutS(vPCBrand, 'CE DM SKU Market PLAN', vInPCBrand, 'Level1_BrandStyle');
AttrPutS(vProfitCenter, 'CE DM SKU Market PLAN',vInPCBrand, 'Level2_ProfitCenter');
AttrPutS(vMarket, 'CE DM SKU Market PLAN', vInPCBrand, 'Level3_Market');
AttrPutS('PC-MAR', 'CE DM SKU Market PLAN', vInPCBrand, 'Level5_MarketTotal');
##=====================
# Load Amount
#=====================
nOldAmount = CELLGETN(vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
#noldamount = noldamount\1000;
asciioutput('E:\TM1Data\CE DM\Logfiles\cedm_noldamount.csv',numbertostring(noldamount),numbertostring(vValue),vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
IF(vValue<>0);
#vValue=vValue\1000;
nAmount = nOldAmount + vValue;
## conversion to /1000
#nValue = nAmount\1000;
#asciioutput('E:\TM1Data\CE DM\Logfiles\cedm_actualsifNOT0'|sPromptName4|''|vPostingPeriod|'.csv',numbertostring(vValue),numbertostring(nValue),sPromptName0|sPromptName3,vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
CELLPUTN(nValue ,vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
ENDIF;
IF( vDim01 @= '2023 Actuals BW @AP23');
nOldAmount = CELLGETN(vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
nAmount1 = nOldAmount + vValue1;
## conversion to /1000
#nValue1= nAmount1\1000;
asciioutput('E:\TM1Data\CE DM\Logfiles\@23cedm_actualsifNOT0'|sPromptName4|'.csv',numbertostring(vValue1),sPromptName0|sPromptName3,vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
CELLPUTN(nValue1,vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
ENDIF;
I need some help related to data formatting.
We re loading the data values form SQL, and data load is working as excepted.
Now user wants to see the values in TM1 in /1000 format.
Ex - of the cube view data is displaying as 4,880,505 - user wants to see value as /1000.
4880505 /1000 = 4881
I have updated the TI process with the below line of code
nValue1= nAmount1\1000; and by using cellputn i am loading the nValue into cube.
but the problem i am facing is, when i am adding that code, values are not matching, it seems may be because of dimension consolidation. i am attaching the dimension structure.
but with normal load values are matching.
please give me some idea.
Any custom format we can use? if so please suggest.
Thank you in advance.
--------------------------------------------------------
asciioutput('E:\TM1Data\CE DM\Extracts\financial'| vAdjType |''|vPostingPeriod|'.csv', vItem, vPostingLevel, vConsolidationUnit, vFunctionalArea, vProfitCenter, vFinDataVersion, vBrandFamily
, vProductType, vPLLine, vAdjustmentType, vPostingPeriod,NumberToString(vAmount),NumberToString(vAmount1));
vItem=SUBST(vItem,4,5);
vAccount='In'| vItem;
vConsolUnit=SUBST(vConsolidationUnit,4,4);
vFunctArea=vFunctionalArea;
vSKUMarket='In'|SUBST(vProfitCenter,6,5);
vBrand = vBrandFamily;
vAdjType=IF(StringToNumber(vAdjustmentType)<10,'000'|vAdjustmentType,'00'|vAdjustmentType);
vProfitCenter1=SUBST(vProfitCenter,6,5);
vProfitCenter = TRIM(vProfitCenter1);
vPostingPeriod=IF(StringToNumber(vPostingPeriod)<10,'M0'|vPostingPeriod,'M'|vPostingPeriod);
vValue=vAmount;
vValue1=vAmount1;
vMarket = ELPAR('CE DM SKU Market PLAN', vProfitCenter,1);
IF( StringToNumber( vPostingLevel ) < 10 );
vPostingLevel = '0' | vPostingLevel;
ENDIF;
IF(vPLLine @= 'PRIMARY PRODUCION COST');
vPLLine = 'PRIMARY PRODUCTION COST';
ENDIF;
IF( vValue = 0 & vValue1=0 );
ItemSkip;
ENDIF;
IF(LONG(vProfitCenter)>4);
ITEMSKIP;
ENDIF;
IF(DIMIX('CE DM P&L Account', vAccount) = 0);
ITEMSKIP;
ENDIF;
vPCBrand = vProfitCenter | ' ' | vBrand;
vInPCBrand = 'In'|vPCBrand;
ATTRPUTS( vProfitCenter, 'CE DM Profit Center', vPCBrand, 'Market Parent');
ATTRPUTS( vBrand, 'CE DM Profit Center', vPCBrand, 'Brand Parent');
sBrandWithSameParent = vBrand | vBrand;
IF(DIMIX('CE DM Profit Center', sBrandWithSameParent)>0);
ATTRPUTS( sBrandWithSameParent, 'CE DM Profit Center', vPCBrand, 'Brand Parent');
ENDIF;
ATTRPUTN( 1, 'CE DM SKU Market', vInPCBrand, 'PCBrandDummy');
#=====================
# Define Cube Dimensions
#=====================
vDim01=pScenarioTarget;
vDim02=vPostingPeriod;
vDim03=vAdjType;
vDim04=vPostingLevel;
vDim05=ATTRS('CE DM Scenario',pScenarioTarget,'FXRateType');
vDim06=vConsolUnit;
vDim07='SDxx';
#vDim08=vSKUMarket;
vDim08=vInPCBrand;
vDim09=vPCBrand;
vDim10='CC00000';
vDim11='InternalOrder01';
vDim12=vFunctArea;
vDim13=vAccount;
vDim14=vPLLine;
vDim15='BaseValue';
#=====================
# Update attributes
#=====================
AttrPutS(vPCBrand, 'CE DM SKU Market PLAN', vInPCBrand, 'Level1_BrandStyle');
AttrPutS(vProfitCenter, 'CE DM SKU Market PLAN',vInPCBrand, 'Level2_ProfitCenter');
AttrPutS(vMarket, 'CE DM SKU Market PLAN', vInPCBrand, 'Level3_Market');
AttrPutS('PC-MAR', 'CE DM SKU Market PLAN', vInPCBrand, 'Level5_MarketTotal');
##=====================
# Load Amount
#=====================
nOldAmount = CELLGETN(vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
#noldamount = noldamount\1000;
asciioutput('E:\TM1Data\CE DM\Logfiles\cedm_noldamount.csv',numbertostring(noldamount),numbertostring(vValue),vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
IF(vValue<>0);
#vValue=vValue\1000;
nAmount = nOldAmount + vValue;
## conversion to /1000
#nValue = nAmount\1000;
#asciioutput('E:\TM1Data\CE DM\Logfiles\cedm_actualsifNOT0'|sPromptName4|''|vPostingPeriod|'.csv',numbertostring(vValue),numbertostring(nValue),sPromptName0|sPromptName3,vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
CELLPUTN(nValue ,vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
ENDIF;
IF( vDim01 @= '2023 Actuals BW @AP23');
nOldAmount = CELLGETN(vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
nAmount1 = nOldAmount + vValue1;
## conversion to /1000
#nValue1= nAmount1\1000;
asciioutput('E:\TM1Data\CE DM\Logfiles\@23cedm_actualsifNOT0'|sPromptName4|'.csv',numbertostring(vValue1),sPromptName0|sPromptName3,vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
CELLPUTN(nValue1,vCube,vDim01,vDim02,vDim03,vDim04,vDim05,vDim06,vDim07,vDim08,vDim09,vDim10,vDim11,vDim12,vDim13,vDim14,vDim15);
ENDIF;
- Attachments
-
- dim_mes.png (17.7 KiB) Viewed 2872 times
-
- Cube view
- Screenshot 2023-07-28 080534.png (30.06 KiB) Viewed 2872 times
-
- Community Contributor
- Posts: 311
- Joined: Fri Feb 15, 2013 5:49 pm
- OLAP Product: TM1
- Version: PA 2.0.9.1
- Excel Version: 365
- Location: Minneapolis, USA
Re: TM1 should display values in /1000 format.
Have you considered loading the data as is from source and using formatting in TM1 to display millions as thousands?
Thousands: #,##0,;(#,##0,)
Millions: #,##0,,;(#,##0,,)
Thousands: #,##0,;(#,##0,)
Millions: #,##0,,;(#,##0,,)
-
- Regular Participant
- Posts: 432
- Joined: Sat Jun 08, 2019 9:55 am
- OLAP Product: Planning Analytics
- Version: Planning Analytics 2.0
- Excel Version: Excel 2016
Re: TM1 should display values in /1000 format.
Hi,
I have used the formatting suggested by ascheevel and it works well in PAW, but the main problem with this is that for the excel reports it won't use the server formatting unless you select the option to do this, and then you might not want that.
The other option is to create a rule for the Thousands measure
Maren
I have used the formatting suggested by ascheevel and it works well in PAW, but the main problem with this is that for the excel reports it won't use the server formatting unless you select the option to do this, and then you might not want that.
The other option is to create a rule for the Thousands measure
Maren
-
- MVP
- Posts: 3223
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: TM1 should display values in /1000 format.
Or create a new measure with the old measure as a child.
The weight is 0.001 for thousands.
No need for rules and you are not loading your values twice.
Maybe what is needed is a bit of formatting to not show decimals.
The weight is 0.001 for thousands.
No need for rules and you are not loading your values twice.
Maybe what is needed is a bit of formatting to not show decimals.
Last edited by Wim Gielis on Sat Jul 29, 2023 1:45 pm, edited 1 time in total.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 5
- Joined: Mon Jul 03, 2023 8:50 am
- OLAP Product: IBM TM1
- Version: 2.0.9.15
- Excel Version: Version 2208 Build 1
Re: TM1 should display values in /1000 format.
Thank you for suggestions.
I edited the element weight of base measure to 0.001 and it worked.
User is checking the consolidations, and is happy that its displaying as excepted.
Thank you for support.
Best Regards,
Jagadish
I edited the element weight of base measure to 0.001 and it worked.
User is checking the consolidations, and is happy that its displaying as excepted.
Thank you for support.
Best Regards,
Jagadish
-
- Posts: 5
- Joined: Mon Jul 03, 2023 8:50 am
- OLAP Product: IBM TM1
- Version: 2.0.9.15
- Excel Version: Version 2208 Build 1
Re: TM1 should display values in /1000 format.
I have one doubt,
is there any chance it applies to N level also.
As of now its applying only for C level element.
Please suggest
is there any chance it applies to N level also.
As of now its applying only for C level element.
Please suggest
Last edited by Jlekkala on Mon Jul 31, 2023 8:35 am, edited 1 time in total.
-
- MVP
- Posts: 3223
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: TM1 should display values in /1000 format.
By adding a child you indeed convert to a C element.
What is the requirement for keeping it as an n-element ?
What is the requirement for keeping it as an n-element ?
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 5
- Joined: Mon Jul 03, 2023 8:50 am
- OLAP Product: IBM TM1
- Version: 2.0.9.15
- Excel Version: Version 2208 Build 1
Re: TM1 should display values in /1000 format.
Yes, /1000 fromat is applied to C level element
but for N level, its not showing /1000 value.
Please suggest
but for N level, its not showing /1000 value.
Please suggest
- Attachments
-
- 1000fromat_Nelement.png (73.93 KiB) Viewed 1972 times
-
- MVP
- Posts: 3223
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: TM1 should display values in /1000 format.
How can the n level show the value /1000 ?
It is the big value that is divided by 1000 and shown on the C level. The n level is unchanged.
It is the big value that is divided by 1000 and shown on the C level. The n level is unchanged.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 5
- Joined: Mon Jul 03, 2023 8:50 am
- OLAP Product: IBM TM1
- Version: 2.0.9.15
- Excel Version: Version 2208 Build 1
Re: TM1 should display values in /1000 format.
Got it Wim.
Thank you for support.
Regards,
Jagadish
Thank you for support.
Regards,
Jagadish