Forum Discussion
Get LastNonBlank Value across all rows
- 9 years ago
Hi tringuyenminh92 I managed to figure it out
Here is the code that I used to return to me the values selected from the Fiscal Year Slicer
ZCALC ROwz2 =
CALCULATE (
CALCULATE ( COUNTROWS ( 'TYOY' ), ALLSELECTED ( 'Date'[Fiscal Year] ) ),
ALLSELECTED ( 'Date' )
)
Hi tringuyenminh92 I managed to figure it out
Here is the code that I used to return to me the values selected from the Fiscal Year Slicer
ZCALC ROwz2 =
CALCULATE (
CALCULATE ( COUNTROWS ( 'TYOY' ), ALLSELECTED ( 'Date'[Fiscal Year] ) ),
ALLSELECTED ( 'Date' )
)
It's good to hear that. Another way to get current selected in slicer is using FirstNonBlank( Values( filter column),1)
- GilbertQ9 years ago
Super User
That does work, but when you have all your dates in the table, it shows all the dates in their row context. So whilst that would work if there was no Fiscal Year in the rows, in my dataset there was. So for each row the FirstNonBlank Date in the row context is the Fiscal Year.