Export Zero Values to Text file.

Post Reply
sg2012
Posts: 27
Joined: Tue Jan 10, 2012 9:13 am
OLAP Product: Tm1 Cognos
Version: 9.5.2
Excel Version: 2007

Export Zero Values to Text file.

Post by sg2012 »

Hi

I have exported Cube View to Text file using TextOutput function.
But can anyone help in suggesting ways to export zero value from cube view to text file without unchecking Skip Zero/Blank Values or usint TI function ViewExtractSkipZeroesSet.

ThankYou in advance:)
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Export Zero Values to Text file.

Post by lotsaram »

sg2012 wrote:But can anyone help in suggesting ways to export zero value from cube view to text file without unchecking Skip Zero/Blank Values or usint TI function ViewExtractSkipZeroesSet.
Seems like an oxymoron. Either you want to skip blanks or you don't, and the method to not skip them is to set ViewExtractSkipZeroesSet=0
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Export Zero Values to Text file.

Post by jim wood »

To back up what lotsaram said in TM1 it regards zeros and blanks as the same value, zero, unless you are talking about elements.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: Export Zero Values to Text file.

Post by Duncan P »

Is UNDEFVALS set in the cube rule. This will have a significant effect on the behaviour.
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Export Zero Values to Text file.

Post by rmackenzie »

lotsaram wrote:Either you want to skip blanks or you don't, and the method to not skip them is to set ViewExtractSkipZeroesSet=0
There are circumstances where the OPs question is quite valid. Consider the scenario where you need to export the GL actuals for a year which is only part complete, and the file must have the months as column headers with separate rows for each account/ centre/ etc combination. In this case you would want to capture that some future months have zero balances but you still need a zero-suppressed view of the cube. The solution in this case is to keep skip zeroes but allow consolidations in the view. Then lock down the view such that only the full year consolidation is included meaning you can iterate over the months for each input row of the data source and output the zero balance values without having to take the performance hit of removing the zero suppression.

Obviously this is a stab in the dark, perhaps sg2012 can elaborate on the question?
Robin Mackenzie
Wim Gielis
MVP
Posts: 3241
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: Export Zero Values to Text file.

Post by Wim Gielis »

rmackenzie wrote:The solution in this case is to keep skip zeroes but allow consolidations in the view. Then lock down the view such that only the full year consolidation is included
Hello Robin,

The issue is / could be that total year is zero but some month(s) outweight(s) other month(s) fully.

Say:

Jan: -100
Feb: +50
Mar: +50
Apr-Dec: 0

Nothing shows up in the file...

I have had this issue too in the past.
To solve it, during the export process I created a new temporary cube with similar dimensions, less the Months dimension.
I storing in the temporary cube a 1 on combinations that need to be exported for the full year. The data source view is all lowest level data you need to export.
Part 2 of the process: exporting 12 monthly values from the data cube, based on the 1's in the temporary cube.
Last bit of the process is clean up, don't forget the temporary cube (although it's low on memory footprint).
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
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Export Zero Values to Text file.

Post by rmackenzie »

Wim Geilis wrote:The issue is / could be that total year is zero but some month(s) outweight(s) other month(s) fully.
Yes, absolutely... your method solves this and is definitely the better solution.
Robin Mackenzie
sg2012
Posts: 27
Joined: Tue Jan 10, 2012 9:13 am
OLAP Product: Tm1 Cognos
Version: 9.5.2
Excel Version: 2007

Re: Export Zero Values to Text file.

Post by sg2012 »

lotsaram wrote:
sg2012 wrote:But can anyone help in suggesting ways to export zero value from cube view to text file without unchecking Skip Zero/Blank Values or usint TI function ViewExtractSkipZeroesSet.
Seems like an oxymoron. Either you want to skip blanks or you don't, and the method to not skip them is to set ViewExtractSkipZeroesSet=0

I want a LOGIC to include zero or blank value in my text file.
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Export Zero Values to Text file.

Post by Alan Kirk »

sg2012 wrote:
lotsaram wrote:
sg2012 wrote:But can anyone help in suggesting ways to export zero value from cube view to text file without unchecking Skip Zero/Blank Values or usint TI function ViewExtractSkipZeroesSet.
Seems like an oxymoron. Either you want to skip blanks or you don't, and the method to not skip them is to set ViewExtractSkipZeroesSet=0
I want a LOGIC to include zero or blank value in my text file.
The LOGIC is to set ViewExtractSkipZeroesSet to either 0 or 1 depending on whether you want the zeroes or not.

As Robin indicated if this approach isn't working for you in some way, you need to elaborate on why it isn't and what it is, specifically, that you are trying to do.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Export Zero Values to Text file.

Post by lotsaram »

rmackenzie wrote:There are circumstances where the OPs question is quite valid. Consider the scenario where you need to export the GL actuals for a year which is only part complete, and the file must have the months as column headers with separate rows for each account/ centre/ etc combination. In this case you would want to capture that some future months have zero balances but you still need a zero-suppressed view of the cube....
.... Obviously this is a stab in the dark, perhaps sg2012 can elaborate on the question?
I don't disagree, and I never said that exporting zero values wasn't valid. A more logical scenario might be wanting to export zero balances of actualized months but still skip future months, or export all balances including nulls for valid Business unit / Cost Centre / Account combinations but skip invalid combinations.

HOWEVER I was trying not to second guess the OP's question, just answer it. (An approach that I recall you recently endorsed ! :))

Maybe UNDEFALS is what they are looking for (I wouldn't recommend it). But it really isn't clear, especially considering the OP's subsequent response. Without any adequate additional information I think the response from Alan is the appropriate one.
Post Reply