Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Hope everybody is good.
Can somebody please help me for the below scenario?
| YEAR | SALE |
| 2000 | |
| 2001 | |
| 2002 | |
| 2003 | 678 |
| 2004 | 243 |
| 2005 | 800 |
| 2006 | 456 |
I want an expression to fetch the first Year value having NOT NULL value of SALE.
In this case I want 2003.
Your Help is appreciated.
Regards
Srawan
May be like this -
=Min({<SALE={"<>ISNULL()"}>}YEAR)
May be this:
Sum({<YEAR = {$(=Min({<YEAR = {"=Sum(SALE) > 0"}>}YEAR))}>}SALE)
If there are really only values for years > 2003, you can try
=Min({<SALE = {"*"}>} YEAR)
Sample image and app attached
Where do you want this to show?
Extending Vijays's Expression you can also use adding a straight table with Year Dim and Expr as below
= Min({< SALE -= {''}>} SALE)
That's not returning 2003, Sunny ![]()
Srawan, if your SALES values could also be just blank, you could also try
=Min({<SALE = {">0"}>}YEAR)
or
=Min({<SALE = {"=Len(Trim(SALE))"} >} YEAR)
I am not sure if the OP needs to just return the year or the sales associated with that year. If the year is needed, you are bang on target ![]()
Yes, could be the case.
Another option for this would be
=FirstSortedValue({<SALE = {">0"}>}SALE, YEAR)
Thanks a lot the solution worked.