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

How to calculate the root of filtered members based on another filter

$
0
0

Hello All,

  Please find the below query.

with member agg as 
sum(

exists([Product].[OTC1].[OTC1],existing([Product].[Pack].[Pack])])
,[Measures].[Values HNA])

select 
agg on 0 from cube where [Product].[Product].&[101]

For a particular product am trying to know the existing packs associated with it and then finding the OTC1's for which we are having sales for a product. 

I want to find the total sales(all product sales) for the OTC1's which are having sales for the filtered product.

Note- In filtered it can be any other product attributes not only product so am going to the lowest level pack to identify the OTC1's.

Regards,

Bharath



Viewing all articles
Browse latest Browse all 14337

Trending Articles



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