Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 darren_dixon
		
			darren_dixon
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
Please could you help I want to find the minimum Date where Description is not equal to Ignore.
I think I need to use the aggr function or set analysis but I'm struggling to make this work.
Table:
| PSN | Date | Description | 
|---|---|---|
| 1880186 | 31/12/2199 | Ignore | 
| 1880186 | 24/07/2015 | Yes | 
| 1880186 | 24/07/2015 | Yes | 
| 1880186 | 07/05/2017 | Yes | 
| 1880186 | 07/05/2017 | Yes | 
I'd like the straight table to look like this:
| Date | PSN | 
|---|---|
| 24/07/2015 | 1 | 
I've got as far as:
Count(Distinct
IF([Description]<>'Ignore',
[Date],))
Thanks,
Darren
 
					
				
		
 effinty2112
		
			effinty2112
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Darren,
Try this straight table:
| Year | Month | Count Distinct PSN | 
|---|---|---|
| 5670 | ||
| 2017 | 01 | 896 | 
| 2017 | 02 | 793 | 
| 2017 | 03 | 842 | 
| 2017 | 04 | 710 | 
| 2017 | 05 | 695 | 
| 2017 | 06 | 529 | 
| 2017 | 07 | 536 | 
| 2017 | 08 | 537 | 
| 2017 | 09 | 132 | 
I wrote a script that made many PSNs to analyse.
Year is this calculated dimension:
=Year(Aggr(Min({$<Description = {'Ignore'}>}Date),PSN))
Month is:
=Num(Month(Aggr(Min({$<Description = {'Ignore'}>}Date),PSN)),'00'
Count Distinct PSN is the expression:
=Count({$<Description = {'Ignore'}>}DISTINCT PSN)
The first PSN created by the script was:
| PSN | Date | Description | 
|---|---|---|
| 1 | 01/02/2017 | Ignore | 
| 1 | 08/03/2017 | Yes | 
| 1 | 02/04/2017 | Yes | 
| 1 | 04/04/2017 | Yes | 
| 1 | 06/04/2017 | Ignore | 
| 1 | 06/06/2017 | Yes | 
When PSN = 1 is selected the straight table returns:
| Year | Month | Count Distinct PSN | 
|---|---|---|
| 1 | ||
| 2017 | 02 | 1 | 
which looks correct.
Cheers
Andrew
May be this?
Count({<Description -= {'Ignore'}, Date = {'$(=Min(Date))'}>} DISTINCT Date)
 antoniotiman
		
			antoniotiman
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Darren,
maybe this
MinString({<Description-={'Ignore'}>} Date)

Regards,
Antonio
 
					
				
		
 effinty2112
		
			effinty2112
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Darren,
This table will give the date you're looking for for each PSN.
| PSN | Min({$<Description -={'Ignore'}>}Date) | 
|---|---|
| 1880186 | 24/07/2015 | 
In your desired table what is the purpose of the PSN column?
In the expression you wrote you seem to be looking for the number of distinct dates where Description <> 'Ignore'. But the answer here is two (the 7th and 24th of July) not one.
| PSN | Min({$<Description -={'Ignore'}>}Date) | Count({$<Description -={'Ignore'}>}DISTINCT Date) | 
|---|---|---|
| 1880186 | 24/07/2015 | 2 | 
Cheers
Andrew
 darren_dixon
		
			darren_dixon
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The PSN is a unique number for a property.
I'm looking to find the minimum date from the date field per PSN where the description is not Ignore so that I can make a straight table to look like below:
| Month | Year | PSN (Distinct count of PSN) | 
|---|---|---|
| 07 | 2015 | 6 | 
| 08 | 2015 | 7 | 
Hopefully that makes sense
 
					
				
		
 effinty2112
		
			effinty2112
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Darren,
Try this straight table:
| Year | Month | Count Distinct PSN | 
|---|---|---|
| 5670 | ||
| 2017 | 01 | 896 | 
| 2017 | 02 | 793 | 
| 2017 | 03 | 842 | 
| 2017 | 04 | 710 | 
| 2017 | 05 | 695 | 
| 2017 | 06 | 529 | 
| 2017 | 07 | 536 | 
| 2017 | 08 | 537 | 
| 2017 | 09 | 132 | 
I wrote a script that made many PSNs to analyse.
Year is this calculated dimension:
=Year(Aggr(Min({$<Description = {'Ignore'}>}Date),PSN))
Month is:
=Num(Month(Aggr(Min({$<Description = {'Ignore'}>}Date),PSN)),'00'
Count Distinct PSN is the expression:
=Count({$<Description = {'Ignore'}>}DISTINCT PSN)
The first PSN created by the script was:
| PSN | Date | Description | 
|---|---|---|
| 1 | 01/02/2017 | Ignore | 
| 1 | 08/03/2017 | Yes | 
| 1 | 02/04/2017 | Yes | 
| 1 | 04/04/2017 | Yes | 
| 1 | 06/04/2017 | Ignore | 
| 1 | 06/06/2017 | Yes | 
When PSN = 1 is selected the straight table returns:
| Year | Month | Count Distinct PSN | 
|---|---|---|
| 1 | ||
| 2017 | 02 | 1 | 
which looks correct.
Cheers
Andrew
 darren_dixon
		
			darren_dixon
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Andrew,
That works!
Thank you for your time. Greatly appreciated.
Thanks,
Darren
 
					
				
		
 effinty2112
		
			effinty2112
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Your welcome Darren!
