Showing posts with label novaview. Show all posts
Showing posts with label novaview. Show all posts

Thursday, March 29, 2012

Calculated Member Formatting

I'm running Panorama Novaview 4.5 against AS 2005 April CTP (Panorama doesn't work against June CTP yet, but I tested the MDX against June CTP and the same problem occurs). In my cube, I have a Metrics dimension with several associated calculated members. When I run a query where I'm not slicing or slicing by one member per attribute, the calculated members formatting works as expected. However, when I run the query and slice by multiple members of an attribute, all calculated members take on the formatting of the selected measure. This behavior still applies if I run the MDX that Novaview generates in SSMS. The following is the MDX and results:

Query with only single member selection:
With
Member [Metrics].[Metrics].[pnMetaX] As 'Null'
Member [Transaction Type].[Transaction Type].[pnMetaY] As 'iif([Metrics].[Metrics].currentmember is[Metrics].[Metrics].[pnMetaX], count([NewSetY]), Null)'
Set [SetAxisX] As '{Except({[Metrics].[Metrics].[Metrics].[Actual],[Metrics].[Metrics].[Metrics].[Current YTD],[Metrics].[Metrics].[Metrics].[Prior YTD],[Metrics].[Metrics].[Metrics].[YTD % Change]},{[Metrics].[Metrics].[pnMetaX]})}'
Set [SetAxisY] As '{HIERARCHIZE ( Except([Transaction Type].[Transaction Type].[Transaction Type].AllMembers,{[Transaction Type].[Transaction Type].[pnMetaY]}))}'
Set [NewSetY] As '{NonEmpty([SetAxisY],[SetAxisX])}'
Set [NewSetX] As '{NonEmpty([SetAxisX],[NewSetY])}'
Set [MainAxisX] As '{Except([NewSetX],{([Metrics].[Metrics].[pnMetaX])}), ([Metrics].[Metrics].[pnMetaX])}'
Set [MainAxisY] As '{Except(Subset ([NewSetY],0,1000 ), {([Transaction Type].[Transaction Type].[pnMetaY])}) ,([Transaction Type].[Transaction Type].[pnMetaY])}'

Select [MainAxisX] On Columns, [MainAxisY] On Rows
From [Simonton Sales]
WHERE ([Date].[Calendar Monthly].[All Dates].[2005], [Measures].[Dollars], [Plant].[Plant].[Plant].[Ritchie County])

Results: (calc members have correct formatting)
Actual Current YTD Prior YTD YTD % Change pnMetaX
Order $81,249,243.32 81,249,243 191,376,964 -57.54% (null)
Repair $345,643.88 345,644 907,068 -61.89% (null)
Credit ($1,775,492.36) -1,775,492 -3,723,484 -52.32% (null)
Debit $56,010.77 56,011 121,655 -53.96% (null)
pnMetaY (null) (null) (null) (null) (null)


Query with multiple member selection:
With
Member [Metrics].[Metrics].[pnMetaX] As 'Null'
Member [Transaction Type].[Transaction Type].[pnMetaY] As 'iif([Metrics].[Metrics].currentmember is[Metrics].[Metrics].[pnMetaX], count([NewSetY]), Null)'
Member [Plant].[Plant].[pnMulti] As 'Sum({[Plant].[Plant].[Plant].[Ritchie County],[Plant].[Plant].[Plant].[Paris]})'
Set [SetAxisX] As '{Except({[Metrics].[Metrics].[Metrics].[Actual],[Metrics].[Metrics].[Metrics].[Current YTD],[Metrics].[Metrics].[Metrics].[Prior YTD],[Metrics].[Metrics].[Metrics].[YTD % Change]},{[Metrics].[Metrics].[pnMetaX]})}'
Set [SetAxisY] As '{HIERARCHIZE ( Except([Transaction Type].[Transaction Type].[Transaction Type].AllMembers,{[Transaction Type].[Transaction Type].[pnMetaY]}))}'
Set [NewSetY] As '{NonEmpty([SetAxisY],[SetAxisX])}'
Set [NewSetX] As '{NonEmpty([SetAxisX],[NewSetY])}'
Set [MainAxisX] As '{Except([NewSetX],{([Metrics].[Metrics].[pnMetaX])}), ([Metrics].[Metrics].[pnMetaX])}'
Set [MainAxisY] As '{Except(Subset ([NewSetY],0,1000 ), {([Transaction Type].[Transaction Type].[pnMetaY])}) ,([Transaction Type].[Transaction Type].[pnMetaY])}'

Select [MainAxisX] On Columns, [MainAxisY] On Rows
From [Simonton Sales]
WHERE ([Date].[Calendar Monthly].[All Dates].[2005], [Measures].[Dollars], [Plant].[Plant].[Plant].[pnMulti])

Results: (calc members all take the formatting of the selected measure)
Actual Current YTD Prior YTD YTD % Change pnMetaX
Order $124,225,094.82 $124,225,094.82 $292,160,648.80 ($1.15) (null)
Repair $501,626.07 $501,626.07 $1,211,672.17 ($1.11) (null)
Credit ($2,809,978.53) ($2,809,978.53) ($5,447,738.20) ($0.92) (null)
Debit $85,167.51 $85,167.51 $197,187.21 ($1.15) (null)
pnMetaY (null) (null) (null) (null) (null)


Definition of YTD % Change calc member:
YTD % Change:
CREATE MEMBER CURRENTCUBE.[Metrics].[Metrics].[YTD % Change]
AS Iif ([Metrics].[Prior YTD] = 0, NULL,
([Metrics].[Current YTD] - [Metrics].[Prior YTD]) / [Metrics].[Prior YTD]),
FORMAT_STRING = "Percent",
NON_EMPTY_BEHAVIOR = { [Units], [Dollars] },
VISIBLE = 1;

I tried to recreate this in the AWDW cube, but the formatting didn't seem to work at all there. I ran the following query (pulled from Novaview) and the Budget Variance % calc member wasn't formatted as %:

With
Member [Scenario].[Scenario].[pnMetaX] As 'Null'
Member [Date].[Fiscal].[pnMetaY] As 'iif([Scenario].[Scenario].currentmember is[Scenario].[Scenario].[pnMetaX], count([NewSetY]), Null)'
Set [SetAxisX] As '{AddCalculatedMembers(Except([Scenario].[Scenario].[Scenario].AllMembers,{[Scenario].[Scenario].[pnMetaX]}))}'
Set [SetAxisY] As '{HIERARCHIZE ( Except([Date].[Fiscal].[(All)].AllMembers,{[Date].[Fiscal].[pnMetaY]}))}'
Set [NewSetY] As '{NonEmpty([SetAxisY],[SetAxisX])}'
Set [NewSetX] As '{NonEmpty([SetAxisX],[NewSetY])}'
Set [MainAxisX] As '{Except([NewSetX],{([Scenario].[Scenario].[pnMetaX])}) ,([Scenario].[Scenario].[pnMetaX])}'
Set [MainAxisY] As '{Except(Subset ([NewSetY],0,1000 ) ,{([Date].[Fiscal].[pnMetaY])}) ,([Date].[Fiscal].[pnMetaY])}'

Select [MainAxisX] On Columns, [MainAxisY] On Rows
From [Finance]
WHERE ([Measures].[Amount])

Results:
Actual Budget Budget Variance Budget Variance % pnMetaX
All Periods $12,609,503.00 $5,583,900.00 $7,025,603.00 1.25818925840362 (null)
pnMetaY (null) (null) (null) (null) 1


Any ideas what could be causing these formatting problems?

Thanks,
Dirk

I upgraded to the June CTP and I'm still having the same problem. Any ideas what could be causing this?

Thanks,
Dirk|||I'm still looking for a solution to this problem. Anyone have any ideas?

Thanks,
Dirk