Forum Discussion
Get LastNonBlank Value across all rows
Hi there I wonder if someone could help me out.
If you can refer to the image below.
What I want is the Value from the ZCALC Rowz (30/06/2019) to be repeated. As is shown the the example in the ZCALC ROwz column (1/07/2020)
The trick here is that I have got a Fiscal Year Slicer, so if I click on Fiscal Year 2019-20 then I want the repeated value to change from 30/06/2019 to be 30/06/2020 for all the rows in the table.
Any help or suggestions will be appreciated.
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' )
)
4 Replies
- tringuyenminh92
Memorable Member
Hi GilbertQ,
I'm sorry but i'm trying to understand your case correctly. Could you please provide the picture of whole report you want and data table with Fields in chart? If there is no sensitive information, you could share current pbix file. So I could quicky understand and help you.
- GilbertQ
Super User
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' )
)- tringuyenminh92
Memorable Member
It's good to hear that. Another way to get current selected in slicer is using FirstNonBlank( Values( filter column),1)