Looked, but did not find anything on this particular topic. Apologize in advance if one exists.
Looks like a TI that uses ViewCreateByMDX is unable to read string measures. SValue is not populated (well, it is populated with 0) and looks like the only way to retrieve a cell string value is by using CELLGETS.
Is it possible to construct the MDX in a way to force/convert a return of a string value?
Have also tried explicitly defining the data variable as string with the same result.
MDX cube views and string measures
- PavoGa
- MVP
- Posts: 622
- Joined: Thu Apr 18, 2013 6:59 pm
- OLAP Product: TM1
- Version: 10.2.2 FP7, PA2.0.9.1
- Excel Version: 2013 PAW
- Location: Charleston, Tennessee
MDX cube views and string measures
Ty
Cleveland, TN
Cleveland, TN
- PavoGa
- MVP
- Posts: 622
- Joined: Thu Apr 18, 2013 6:59 pm
- OLAP Product: TM1
- Version: 10.2.2 FP7, PA2.0.9.1
- Excel Version: 2013 PAW
- Location: Charleston, Tennessee
Re: MDX cube views and string measures
Okay, WITH MEMBER resolves this problem...
@jimnaff helped with this.
@jimnaff helped with this.
Ty
Cleveland, TN
Cleveland, TN
-
- MVP
- Posts: 3704
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: MDX cube views and string measures
How exactly? Would be useful to post some example MDX.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
- PavoGa
- MVP
- Posts: 622
- Joined: Thu Apr 18, 2013 6:59 pm
- OLAP Product: TM1
- Version: 10.2.2 FP7, PA2.0.9.1
- Excel Version: 2013 PAW
- Location: Charleston, Tennessee
Re: MDX cube views and string measures
This code works in PAX and returns values as desired:
Code: Select all
SELECT
{
[lookup.Measure].[lookup.Measure].[Rollup Account Primary Name]
}
ON COLUMNS,
NON EMPTY
TM1SUBSETTOSET( [Accounts Master], "Distinct Accounts")
ON ROWS
FROM [lookup.FPRP]
WHERE ([Version].[Active_01],
[sys.Websheet Control].[Effective])
This code works in a TI. The TI will return the same values as the previous code, but in PAX does not return any values.
Code: Select all
WITH MEMBER [lookup.Measure].[lookup.Measure].[Rollup Account Test] AS
[lookup.Measure].[lookup.Measure].[Rollup Account Primary Name]
SELECT
{ [lookup.Measure].[lookup.Measure].[Rollup Account Test] }
ON COLUMNS,
NON EMPTY
TM1SUBSETTOSET( [Accounts Master], "Distinct Accounts")
ON ROWS
FROM [lookup.FPRP]
WHERE ([Version].[Active_01],
[sys.Websheet Control].[Effective])
This version returns blank values in PAX. Did not test, but expect this to work in TI returning values AND records with blank values.
Code: Select all
WITH MEMBER [lookup.Measure].[lookup.Measure].[Rollup Account Test] AS
[lookup.Measure].[lookup.Measure].[Rollup Account Primary Name]
SELECT
{
[lookup.Measure].[lookup.Measure].[Rollup Account Test]
}
ON COLUMNS,
TM1SUBSETTOSET( [Accounts Master], "Distinct Accounts")
ON ROWS
FROM [lookup.FPRP]
WHERE ([Version].[Active_01],
[sys.Websheet Control].[Effective])
Ty
Cleveland, TN
Cleveland, TN
-
- MVP
- Posts: 3240
- 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: MDX cube views and string measures
Thank you !
I reproduced this on a small test cube with numeric and string measures and I can see that it works.
I reproduced this on a small test cube with numeric and string measures and I can see that it works.
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