For loop required


hello all,

    finding top count of 15 manufactures based below query.

with set agg as
extract (topcount( 
crossjoin([product].[manufacturer].[manufacturer].members, [wholesaler].[wholesaler group].&[grupo cofares],{[product].[market segment1].&[dermocosmetica],[product].[market segment1].&[accesorios sanitarios]})
,  
15, [measures].[indirect ex-mnf sales value]),[product].[manufacturer])

however might 14 manuacturers because can have manufacturer repeating because of multiple market segments.

so in case need top 16 or on until exact 15 manufacterer's.

can 1 suggest?

thank you!!

regards,

bharath

hi bharath,

providing able make rough estimations, maybe can live following  quick  , easy  solution:  

you may wrap set head(,15) function if take topcount(,x) large enough. 

head(  	extract (topcount(  	..... 	,50, 	..... 	.....[manufacturer]) 	  ,15)
philip,



SQL Server  >  SQL Server Analysis Services



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........