SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Filter By AND e not for OR/AND


Filter By AND e not for OR/AND

Author
Message
jmolapa
jmolapa
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 6

Good evening
I need your valuable help. For the following example:

In this DataSet:

The tables data:


I create the next report:


What I want to see are the salesof customers who buy Bikes and Phones. And not those who buy Bikes and/or Phone.
In other words, I wanted se the Clients sto buy the two products. The following output.


Can you help me? I'm working on SSAS Azure.
Thank you.


Matt Simmons
Matt Simmons
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1537 Visits: 445
You maybe able to use a count function and count the Number of ProductID's and filter out > 1.

Regards,
Matt
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (512K reputation)SSC Guru (512K reputation)SSC Guru (512K reputation)SSC Guru (512K reputation)SSC Guru (512K reputation)SSC Guru (512K reputation)SSC Guru (512K reputation)SSC Guru (512K reputation)

Group: General Forum Members
Points: 512062 Visits: 44309
I don't know squat about SSAS. Can it actually use a T-SQL query where you need it? If it can, I have a high performance method for doing this. It may require dynamic SQL based on your request but that should be no biggee to do in an SQL Injection Proof manner. It will require some new indexes if they're not in place already.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
drew.allen
drew.allen
SSC-Dedicated
SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)

Group: General Forum Members
Points: 37038 Visits: 13704
Jeff Moden - Thursday, January 4, 2018 7:53 AM
I don't know squat about SSAS. Can it actually use a T-SQL query where you need it? If it can, I have a high performance method for doing this. It may require dynamic SQL based on your request but that should be no biggee to do in an SQL Injection Proof manner. It will require some new indexes if they're not in place already.

SSAS uses MDX, which is completely different from T-SQL. It's been a long time since I used MDX, so I can't really give any pointers here.

Drew

J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
How to post data/code on a forum to get the best help.
How to Post Performance Problems
Make sure that you include code in the appropriate IFCode tags, e.g. [code=sql]<your code here>[/code]. You can find the IFCode tags under the INSERT options when you are writing a post.
jmolapa
jmolapa
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 6
Hello everyone.

Thank you in advance for your prompt assistance.
The development of the cube is to be done in SSAS Tabular Technology, that actually use DAX.
The MDX is used for SSAS Multidimensional Cube.

Thanks again to all. Smile
Greetings,
subramaniam.chandrasekar
subramaniam.chandrasekar
SSChasing Mays
SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)

Group: General Forum Members
Points: 618 Visits: 238
jmolapa - Saturday, January 6, 2018 7:01 AM
Hello everyone.

Thank you in advance for your prompt assistance.
The development of the cube is to be done in SSAS Tabular Technology, that actually use DAX.
The MDX is used for SSAS Multidimensional Cube.

Thanks again to all. Smile
Greetings,

We all know DAX (Data Analysis Expression) is similar to excel, Kindly use below,

Bike Or Phone Category IN :=CALCULATE ( [Soma de value], Products[Category] IN { "Bike", "Phone" })

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search