Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
DDL1976
Frequent Visitor

Lookup Value with filters

Hi there,
 
I need to find the finacial period number from a table based on the current date filter on the page, the DAX below works most of the time except for periods where our data is a bit weird...
 
CFP = LOOKUPVALUE(
DimPeriod[Financial Period],
DimPeriod[Period End Date],
LASTDATE(DimPeriod[Period End Date]))
 
The DimPeriod Table looks a little like this...
Period End DateFinancial YearFinancial PeriodDescription
28/02/20212020/2111Febuary 2021
31/03/20212020/2112March 2021
31/03/20212020/21 YE March 2021
30/04/20212021/2201April 2021

 

Assuming my page date filter is set as on/before 31/03/2021 I want to return the value of 12 based on the table above.

 

Any Ideas would be most welcome!
Thanks!!!!

1 REPLY 1
amitchandak
Super User
Super User

@DDL1976 , Not very clear. The best way is have FY Period on you date table, and then you can get period for any selected value in slicer from date table

 

Measure  =

var _max = allselected('Date'[FY Period])

return

////// Your calculation

 

You can not use slicer value in a column calculation

 

Creating Financial Calendar - From Any Month
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calend...

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.