Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there,
I have the following data that I am filtering buy a Value_date. I only want to show the deal id if it's last value date is equal to the last date specified in the filter.
AA Last value date is a measure with
@Annemie19 you can use this function
A Last value date = LASTDATE(InterestAccrual[ValueDate_Date])
Thank you
The link provided explains it quite well, I think, but if that is not enough I would need a sample pbix (mock or real data) and I can build it for you. That'd probably be easier to follow than trying to explain here.
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
It is not allowing me to attach pbix files but here is table data.
Thanks a lot.
| ShortName | DealType | DealID | DealNumber | Nominee | Name | AA Nominal Amount | AA Last Proj_date | AA Last value date | AA total Interest Accrual | AA Days diff |
| AEXXXXXXX | Share Issue | SI000165-01 | 675 | NeXXXXXXX | 50000000 | 03/11/2001 | 03/11/2001 | -11788.5 | 1 | |
| AEXXXXXXX | Share Issue | SI000176-01 | 688 | deXXXXXXX | 50000000 | 18/01/2002 | 18/01/2002 | -12753.42 | 1 | |
| AEXXXXXXX | Share Issue | SI000177-01 | 689 | deXXXXXXX | 50000000 | 22/01/2002 | 22/01/2002 | -13089.04 | 1 | |
| AEXXXXXXX | Share Issue | SI000179-01 | 692 | XXXXXXX | LoXXXXXXX | 20000000 | 15/01/2002 | 15/01/2002 | -4701.37 | 1 |
| AEXXXXXXX | Share Issue | SI000179-02 | 1696 | IGXXXXXXX | LoXXXXXXX | 20000000 | 15/07/2002 | 15/07/2002 | -5084.93 | 1 |
| AEXXXXXXX | Share Issue | SI000179-03 | 1849 | IGXXXXXXX | LoXXXXXXX | 20000000 | 29/11/2002 | 29/11/2002 | -5402.74 | 1 |
| AEXXXXXXX | Share Issue | SI000180-01 | 693 | CoXXXXXXX | 100000000 | 14/01/2002 | 14/01/2002 | -24219.18 | 1 | |
| AEXXXXXXX | Share Issue | SI000190-01 | 704 | IGXXXXXXX | E.XXXXXXX | 5000000 | 05/03/2002 | 05/03/2002 | -1284.93 | 1 |
| AEXXXXXXX | Share Issue | SI000199-01 | 713 | IGXXXXXXX | JoXXXXXXX | 1000000 | 19/03/2002 | 19/03/2002 | -287.67 | 1 |
| AEXXXXXXX | Share Issue | SI000613-02 | 1537 | XXXXXXX | BaXXXXXXX | 25000000 | 12/09/2001 | 12/09/2001 | -5363.01 | 1 |
| AEXXXXXXX | Share Issue | SI000613-03 | 1678 | XXXXXXX | BaXXXXXXX | 25000000 | 12/03/2002 | 12/03/2002 | -5410.96 | 1 |
| AEXXXXXXX | Share Issue | SI000680-01 | 1691 | XXXXXXX | FiXXXXXXX | 50000000 | 20/11/2002 | 20/11/2002 | -13795.81 | 1 |
| AEXXXXXXX | Share Issue | SI000680-02 | 1946 | ILXXXXXXX | FiXXXXXXX | 50000000 | 28/11/2003 | 28/11/2003 | -10520.55 | 1 |
| AEXXXXXXX | Share Issue | SI000690-01 | 1718 | IGXXXXXXX | SaXXXXXXX | 17000000 | 29/03/2005 | 29/03/2005 | -4704.11 | 1 |
| AEXXXXXXX | Share Issue | SI000690-02 | 2596 | XXXXXXX | SaXXXXXXX | 17000000 | 01/04/2008 | 01/04/2008 | -4187.12 | 1 |
| AEXXXXXXX | Share Issue | SI000700-01 | 1751 | IGXXXXXXX | SaXXXXXXX | 20000000 | 10/05/2005 | 10/05/2005 | -5547.95 | 1 |
| AEXXXXXXX | Share Issue | SI000700-02 | 2640 | SaXXXXXXX | 20000000 | 12/05/2008 | 12/05/2008 | -5095.89 | 1 | |
| AEXXXXXXX | Share Issue | SI001263-03 | 5808 | SaXXXXXXX | 550000000 | 30/09/2020 | 30/09/2020 | -62232.88 | 1 | |
| AEXXXXXXX | Share Issue | SI001282-02 | 5768 | SaXXXXXXX | 80000000 | 30/09/2020 | 30/09/2020 | -9052.05 | 1 | |
| AEXXXXXXX | Share Issue | SI001514-01 | 5354 | ClXXXXXXX | SaXXXXXXX | 150000000 | 30/09/2020 | 30/09/2020 | -16972.6 | 1 |
| AEXXXXXXX | Share Issue | SI001523-01 | 5728 | SPXXXXXXX | InXXXXXXX | 35000000 | 30/09/2020 | 30/09/2020 | -3356.16 | 1 |
| AEXXXXXXX | Share Issue | SI001527-01 | 5895 | SPXXXXXXX | InXXXXXXX | 90000000 | 20/08/2020 | 30/09/2020 | -371993.43 | 42 |
| AEXXXXXXX | Share Issue | SI001529-01 | 5949 | SPXXXXXXX | InXXXXXXX | 25000000 | 20/08/2020 | 30/09/2020 | -103331.5 | 42 |
| AEXXXXXXX | Share Issue | SI001530-01 | 6130 | SPXXXXXXX | InXXXXXXX | 100000000 | 20/07/2020 | 30/09/2020 | -864929.29 | 73 |
| AEXXXXXXX | Share Purchase | SP000065-01 | 686 | InXXXXXXX | -200000000 | 18/12/2000 | 21/06/2003 | 88939051.28 | 916 | |
| AEXXXXXXX | Share Purchase | SP000836-01 | 5274 | IEXXXXXXX | -420000000* | 30/04/2020 | 30/09/2020 | 5839799.04 | 154 | |
| AEXXXXXXX | Share Purchase | SP000871-01 | 5628 | SIXXXXXXX | InXXXXXXX | -159000000 | 01/07/2020 | 30/09/2020 | 1947327.43 | 92 |
| AEXXXXXXX | Share Purchase | SP000872-01 | 5630 | SIXXXXXXX | InXXXXXXX | -160000000 | 01/07/2020 | 30/09/2020 | 1959574.75 | 92 |
| AEXXXXXXX | Share Purchase | SP000897-01 | 6029 | ClXXXXXXX | InXXXXXXX | -830000000 | 30/09/2020 | 30/09/2020 | 82249.59 | 1 |
| AEXXXXXXX | Share Purchase | SP000898-01 | 6030 | ClXXXXXXX | InXXXXXXX | -150000000 | 20/08/2020 | 30/09/2020 | 640183.56 | 42 |
| AEXXXXXXX | Share Purchase | SP000905-01 | 6149 | A XXXXXXX | BuXXXXXXX | -118861020 | 20/07/2020 | 30/09/2020 | 1674673.32 | 73 |
| AEXXXXXXX | Share Purchase | SP000906-01 | 6150 | C XXXXXXX | BuXXXXXXX | -2462330.76 | 20/07/2020 | 30/09/2020 | 34692.62 | 73 |
| AEXXXXXXX | Share Purchase | SP000907-01 | 6151 | A XXXXXXX | BuXXXXXXX | -21398580 | 20/07/2020 | 30/09/2020 | 301491.88 | 73 |
| AEXXXXXXX | Share Purchase | SP000908-01 | 6152 | C XXXXXXX | BuXXXXXXX | -835908.36 | 20/07/2020 | 30/09/2020 | 11777.4 | 73 |
| AEXXXXXXX | Share Purchase | SP000909-01 | 6153 | A XXXXXXX | BuXXXXXXX | -25474500 | 20/07/2020 | 30/09/2020 | 358918.9 | 73 |
| AEXXXXXXX | Share Purchase | SP000910-01 | 6154 | C XXXXXXX | BuXXXXXXX | -951966 | 20/07/2020 | 30/09/2020 | 13412.57 | 73 |
| AEXXXXXXX | Share Purchase | SP000911-01 | 6155 | A XXXXXXX | BuXXXXXXX | -13081905 | 20/07/2020 | 30/09/2020 | 184315.41 | 73 |
| AEXXXXXXX | Share Purchase | SP000912-01 | 6156 | C XXXXXXX | BuXXXXXXX | -812300.31 | 20/07/2020 | 30/09/2020 | 11444.78 | 73 |
| AEXXXXXXX | Share Purchase | SP000913-01 | 6169 | A XXXXXXX | K2XXXXXXX | -2622375 | 20/07/2020 | 30/09/2020 | 36947.53 | 73 |
| AEXXXXXXX | Share Purchase | SP000914-01 | 6170 | C XXXXXXX | K2XXXXXXX | -104079.5 | 20/07/2020 | 30/09/2020 | 1466.41 | 73 |
You can share the URL to the file hosted elsewhere: Dropbox, Onedrive... or just upload the file to a site like tinyupload.com (no sign-up required).
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
1. Create this measure:
Show Measure =
VAR isLast_ =
SELECTEDVALUE(data021_forum__2[AA Last value date]) =
CALCULATE(MAX(data021_forum__2[AA Last value date]),ALLEXCEPT(data021_forum__2,data021_forum__2[ShortName], data021_forum__2[DealType]))
RETURN
IF(isLast_, 1, 0)
It assumes you want to look at date by ShirtName and DealType. If you want the latest date per only ShirtName it needs only ShortName in the ALLEXCEPT():
Show Measure =
VAR isLast_ =
SELECTEDVALUE(data021_forum__2[AA Last value date]) =
CALCULATE(MAX(data021_forum__2[AA Last value date]),ALLEXCEPT(data021_forum__2,data021_forum__2[ShortName]))
RETURN
IF(isLast_, 1, 0)
2. Select the visual and place the measure in the visual filters. Select to show when value of the measure is 1
3. See it all at play in the attached file
4. I would recommend to have a proper date table and use it for filtering instead of using the date columns in your main/fact table. I would also recommend not to use the data hierarchy feature and use the date table instead (https://community.powerbi.com/t5/Desktop/How-to-remove-Date-Hierarchy/td-p/647711)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
thanks a lot. But, it is now giving me and error that 'SELECTEDVALUE' is not a function:
Do you know how I can resolve this?
Kind Regards,
Annemie
@Annemie19 you can use this SELECTEDVALUE( ) put date value inside this ,may be some spell mistake will be there.
Perhaps there's some restriction with SELECTEDVALUE() in the environment you are using? Try this:
aa Show Measure =
VAR isLast_ =
IF (
HASONEVALUE ( InterestAccrual[ValueDate_Date] ),
VALUES ( InterestAccrual[ValueDate_Date] )
)
= CALCULATE (
MAX ( InterestAccrual[ValueDate_Date] ),
ALLEXCEPT ( Subsidiary, Subsidiary[ShortName] )
)
RETURN
IF ( isLast_, 1, 0 )
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi @aib
It is just showing zeros for all items.
this is the measure I used:
Hi @Annemie19
You can create a measure that returns a 1 when the rows is to be shown and a zero when it isn't. then use that measure as filter for the visual, showing values whne the measure is 1.
Check this out for further info: https://www.sqlbi.com/articles/applying-a-measure-filter-in-power-bi/
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi Aid,
I'm not really sure how to do this as I am quite new to powerbi.
I need to write a measure to show only rows that have a value date which is equal to the last value date specified in the date slider.
Kind Regards,
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |