
Active Member

June 6, 2021

Hi,
I am new to the forum and hope my question is placed in the right area....
I have been experimenting with the "Personal Stock Portfolio Dashboard", which I find just great!
Just one question: in the "Dashboard" sheet, the set of current holdings is sorted in alphabetical order. How could I sort this using the ticker field?
If I replace the formula in B7 with the following:
=SORT(UNIQUE(Ledger[Stock]:Ledger[Ticker]),2)
I do get what I need, ie. holdings sorted per ticker, by the rest of the dashboard formulas do not work anymore.
It looks as if the spill table generated by the formula above is now intrinsically two columns wide, while the other formulas would logically expect just one column.
Any suggestions on how I could solve my problem?
Thanks a lot,
Gabriele


July 16, 2010

Hi Gabriele,
Welcome to our forum!
The reason your other formulas aren't working anymore is because your formula is returning 2 columns of data, the stock and the ticker. You can use the SORTBY function to sort based on the ticker column.
For example, based on my file:
=SORTBY( UNIQUE(FILTER(Ledger[Stock],SUMIF(Ledger[Stock],Ledger[Stock],Ledger[Units])<>0)), UNIQUE(FILTER(Ledger[Ticker],SUMIF(Ledger[Stock],Ledger[Stock],Ledger[Units])<>0)) )
Mynda
1 Guest(s)
