Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Pass a parameter through my query

$
0
0

Hi everyone

I 'm using tabular model and reporting service to generate my reports.

I'm trying to calculate number of my customers who bought under below circumstances:

1.they should have more than 12 orders

2.they should bought in more than 2 sales channels

3.They should bought in more than 5 Product Lines

Until now i can easily generate a measure in my tabular model using DAX just like this:

EngagedCustomer:=CALCULATE(DISTINCTCOUNT([CustomerId]),filter (summarize ('FactSaleOrderLineItem','FactSaleOrderLineItem'[customerid] ,
"Order Count",DISTINCTCOUNT('FactSaleOrderLineItem'[salesorderid]),"Line Count",DISTINCTCOUNT('FactSaleOrderLineItem'[Category3])
,"SalesChannel Count",DISTINCTCOUNT('FactSaleOrderLineItem'[SalesChannelId])) 
,Calculate(DISTINCTCOUNT('FactSaleOrderLineItem'[salesorderid]))>12 && Calculate(DISTINCTCOUNT('FactSaleOrderLineItem'[Category3]))>5 && Calculate( DISTINCTCOUNT('FactSaleOrderLineItem'[SalesChannelId]) )>2))

but the problem occurs when the other condition comes.

"EngagedCustomer" should bought more than certain Amount ,which user can pass to the report!so DAX wouldn't be useful for me any more,

My question is how can i solve this problem using MDX query in my report?

How can i pass manual parameter which is not a member of my dimension?

Any help related to this matter would be appreciate.


Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>