Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 agastya
		
			agastya
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Team,
Hope you all doing great!!!!!
Dimension :- If(Year="2020",Year)
Expression :-
Count(aggr( if((MaxString({<NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number)-MinString({1<NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number))>0,
if((MaxString({<NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number))>(MinString({<NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number)),
(MaxString({<NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number)-MinString({<NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number)),'')),Drawing_Roo_Program_Key))
If i am making year selection i.e 2020 in this case i am getting current count as "349"
when i am deselecting the Year selection count are mismatching i.e "103"
Thank you looking for positive reply:)
@sunny_talwar @bharathadde
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be try this
Count({<Year = {'2020'}>}Aggr(
If(MaxString({<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number) - MinString({1<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number) > 0,
If(MaxString({<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number) > MinString({<NewFlag_Ignore={'N'}, Year = {'2020'}>} DRAWING_REVISION_Number),
MaxString({<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number) - MinString({<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number), ''))
, Drawing_Roo_Program_Key))But it seems like this could be converted to this
Sum({<Year = {'2020'}>}Aggr(
RangeMax(MaxString({<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number) - MinString({<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number), 0)
, Drawing_Roo_Program_Key)) agastya
		
			agastya
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Used above range max formula "103" count written with/Without selection year filter @sunny_talwar
 agastya
		
			agastya
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		349 value will reflect with/Without selection
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How about this?
Count({<Year = {'2020'}>}Aggr(
If(MaxString({<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number) - MinString({1<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number) > 0,
If(MaxString({<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number) > MinString({<NewFlag_Ignore={'N'}, Year = {'2020'}>} DRAWING_REVISION_Number),
MaxString({<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number) - MinString({<NewFlag_Ignore = {'N'}, Year = {'2020'}>} DRAWING_REVISION_Number), ''))
, Drawing_Roo_Program_Key))
					
				
			
			
				
			
			
			
			
			
			
			
		 agastya
		
			agastya
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 agastya
		
			agastya
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Issue is that
(Count({1<Drawing_Roo_Program_Key=p(Drawing_Roo_Program_Key)>} aggr(if(aggr(MaxString({< NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number)-MinString({1< NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number),Drawing_Roo_Program_Key)>0,
if((MaxString({< NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number))>(MinString({< NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number)),
(MaxString({< NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number)-MinString({< NewFlag_Ignore={'N'}>}DRAWING_REVISION_Number)),'')),Drawing_Roo_Program_Key)))
When i am selecting 2020 year filter some of the record which is in 2019,2028
expected o/p
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Some of the records are from 2018 and 2019? But you still want to see them against 2020? Can you elaborate on why are you doing this?
 agastya
		
			agastya
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
In the above image selected year is 2020 but couple of Drawing_root_key which is active in 2018 and 2019 as well .
so when i am selecting 2020 year all possible combination will going to consider in 2020
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Okay so that make sense, I can get you the result when 2020 is selected, but what happens when 2020 is not selected? How would the result look then? Or will you always display this for the most recent year?
