Showing posts with label contain. Show all posts
Showing posts with label contain. Show all posts

Wednesday, March 7, 2012

Defining a named set

I have built a cube and I want to add a named set. Following dimensions are important: suscriber and handset. The set I want to create should contain only those subscribers for which the handset is different from the handset from the month before.

I tried to use the filter function resulting in the following:

filter([Dim Subscriber].[Subscriber].[Subscriber].members,([Time].[Month],[Dim Handset].[Dim Handset].[Dim Handset])<>([Time].[Month].prevmember,[Dim Handset].[Dim Handset].[Dim Handset]))

But deploying the cube returns the error message that "<>" cannot be used with sets...

Can anybody help me? Thanks in advance...

Regards

Joos

Use MemberValue for handset

(See help at ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/mdxref9/html/f9b2af16-2b81-48e4-ae81-99f64e4bbc98.htm in Books online).

|||

But then I have to define a specific handset member. I want only those subscribers for which the handset in the current month is different from the month before. Maybe I do have to use the measure base, which simply counts all subscribers?

filter([Dim Subscriber].[Subscriber].[Subscriber].members,([Time].[Month],[Dim Handset].[Dim Handset].[Dim Handset],[Measures].[Base])<>([Time].[Month].prevmember,[Dim Handset].[Dim Handset].[Dim Handset],[Measures].[Base]))

But this returns the error: Error 1 The '<>' operator cannot be used with sets.

|||

You mentioned that [Dim Subscriber] and [Dim Handset] dimensions are important, but didn't describe the fact table data. Anyway, assuming that there are only fact records in a given month for valid combinations of Subscriber and Handset, it's still not clear how you define the current month. So, assuming that the current month is the last in the [Time].[Month] hierarchy:

>>

Extract(Filter(NonEmpty([Dim Subscriber].[Subscriber].[Subscriber].Members

* [Dim Handset].[Handset].[Handset].Members * Tail([Time].[Month].[Month].Members),

{[Measures].[Base]}),

IsEmpty(([Measures].[Base], [Time].[Month].PrevMember))),

[Dim Subscriber].[Subscriber])

>>

Sunday, February 19, 2012

default value after replication

Hi all,
I have problem when conducting the replication.
Some tables in subscriber side contain default values and null values
respectively. After replication, all these fields are blank.
Is there any setting to keep the default and null values repectively after
replication?
Thanks a lot!!
If this is transactional replication I suspect you will need to modify the
replication stored procedures to obtain the behaviors you are looking for.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Andrew" <andrew@.iplr.com.hk> wrote in message
news:uX0zZMxVGHA.3760@.TK2MSFTNGP15.phx.gbl...
> Hi all,
> I have problem when conducting the replication.
> Some tables in subscriber side contain default values and null values
> respectively. After replication, all these fields are blank.
> Is there any setting to keep the default and null values repectively after
> replication?
> Thanks a lot!!
>
|||Andrew,
have a look at the @.schema_option argument for sp_addarticle, which has a
value for defaults: 0x800.
AFAIR if you select the checkboxes on the article properties, you will end
up with the defaults added, even though it isn't explicitly mentioned.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hi Paul,
You're so great! It works now.
Thanks for you help again!!
Cheers!
Andrew
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:ebsqhbyVGHA.5064@.TK2MSFTNGP10.phx.gbl...
> Andrew,
> have a look at the @.schema_option argument for sp_addarticle, which has a
> value for defaults: 0x800.
> AFAIR if you select the checkboxes on the article properties, you will end
> up with the defaults added, even though it isn't explicitly mentioned.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>