[Mondrian] LastNonEmpty and slicers problem

Hilario Fernandes hilario.fernandes at cortex-intelligence.com
Tue Oct 14 11:42:15 EDT 2014


Hey Matt,

Thanks for the reply! I've put the set directly on the axis and it works as
expected. I've added the information on the issue you pointed out and
voted! Guess there's nothing else i can do at the moment... I'm going to
try and find a workaround of some sort...

On Tue, Oct 14, 2014 at 1:28 PM, Matt Campbell <mcampbell at pentaho.com>
wrote:

>
>
> Hi Hilario,
>
> There’s a known issue with named set evaluation in the context of a
> compound slicer (MONDRIAN-1654).  Can you try moving the [date] set
> directly onto the row axis to see whether you get expected numbers?  And if
> that *is* your issue, vote and/or comment on the case.  I’d love to see
> it get addressed.
>
>
>
> Matt
>
>
>
>
>
> *From:* mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org]
> *On Behalf Of *Hilario Fernandes
> *Sent:* Monday, October 13, 2014 12:43 PM
> *To:* Mondrian mailing list
> *Subject:* [Mondrian] LastNonEmpty and slicers problem
>
>
>
> Hi,
>
>
>
> I'm experiencing a weird behaviour while using the LastNonEmpty function.
> My MDX is as follows:
>
>
>
> WITH
>
> SET [date] AS
>
> {LastNonEmpty([date.YEAR].[YEAR].Members, [Measures].[measure_SUM])}
>
>
>
> SELECT
>
> NON EMPTY {[Measures].[measure_SUM]} ON COLUMNS,
>
> NON EMPTY {[date]} ON ROWS
>
>
>
> FROM [cube]
>
> WHERE {[product].[product].[a], [product].[product].[c]}
>
>
>
> The schema:
>
>
>
> <Cube name='cube' visible='true' cache='true' enabled='true'>
>
>   <Table name='CUBE_609d989076e048e2a9ee831bdeaee2b3_FACT'
> alias='FACT_252ad422f6ae474fb25001f7586bdbd2' />
>
>    <Dimension name='product' caption='product' visible='true'>
>
>     <Hierarchy name='product' caption='product' allMemberName='Total
> product' visible='true' hasAll='true'>
>
>       <Level name='product' caption='product' visible='true'
> column='ATTR_c7a295ae3dfa4af9acaacc56fc16c276' uniqueMembers='true'
> levelType='Regular' hideMemberIf='Never' type='String' />
>
>     </Hierarchy>
>
>   </Dimension>
>
>   <DimensionUsage name='date' source='Shared Date' caption='date'
> visible='true' foreignKey='DIM_ID_b6c96b55efdd430b8b991d20f6eef622' />
>
>   <Measure caption='measure_SUM' name='measure_SUM'
> column='MEASURE_bfe8f487ff6846b58195028020207647' formatString='Standard'
> aggregator='sum' />
>
> </Cube>
>
>
>
> and the data:
>
>
>
> product, date, measure
>
> a,2014-01-01, 10
>
> b,2014-01-01, 20
>
> c,-,null
>
>
>
> The problem is i'd expect the above query to return the sum of the measure
> for the year 2014, considering the slicers, but it doesn't. Seems like the
> slicers aren't being properly applyed, and only the last of the set is
> considered during LastNonEmpty evaluation. In this case it returns nothing,
> because the measure is null for [product].[product].[c].
>
>
>
> Is this a known problem or am i doing something wrong? I've been debugging
> mondrian code trying to understand what's going on hoping to narrow the
> problem and it seems to be related to LastNonEmpty.
>
>
>
> I appreciate any help! Thank you!
>
>
>
>
>
> --
>
> Hilario Fernandes
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>


-- 
Hilario Fernandes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20141014/eed4ede1/attachment-0001.html 


More information about the Mondrian mailing list