Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi !
Using only one table - What is wrong with this calculated column ?
Ex.Rate_cont =
IF (
dimDate[Ex.Rate] = BLANK (),
CALCULATE (
FIRSTNONBLANK ( dimDate[Ex.Rate], dimDate[Ex.Rate] ) ,
FILTER ( dimDate, dimDate[Date] <= EARLIER ( dimDate[Date] ) )
),
dimDate[Ex.Rate]
)
See the results belowTrying to fill the gaps with the last registered exchange rate
Solved! Go to Solution.
@Yggdrasill,
Please use Dax below instead.
New Value =
VAR LastNonBlankDate =
CALCULATE (
LASTNONBLANK ( dimDate[Date], 1 ),
FILTER (
ALL ( dimDate ),
dimDate[Date]<= EARLIER ( dimDate[Date] )
&& NOT ( ISBLANK ( dimDate[Ex.Rate]) )
)
)
RETURN
CALCULATE (
SUM ( dimDate[Ex.Rate] ),
FILTER ( ALL ( dimDate ), dimDate[Date] = LastNonBlankDate )
)
For more details, please check attached PBIX file.
Regards,
Lydia
@Yggdrasill,
Please use Dax below instead.
New Value =
VAR LastNonBlankDate =
CALCULATE (
LASTNONBLANK ( dimDate[Date], 1 ),
FILTER (
ALL ( dimDate ),
dimDate[Date]<= EARLIER ( dimDate[Date] )
&& NOT ( ISBLANK ( dimDate[Ex.Rate]) )
)
)
RETURN
CALCULATE (
SUM ( dimDate[Ex.Rate] ),
FILTER ( ALL ( dimDate ), dimDate[Date] = LastNonBlankDate )
)
For more details, please check attached PBIX file.
Regards,
Lydia
Thank you Lydia ! Still wondering what was wrong with my previous formula though !
Hi,
Does this calculated column formula work?
Ex.Rate_cont = IF(dimDate[Ex.Rate]=BLANK(),LOOKUPVALUE(dimDate[Ex.Rate],dimDate[Date],CALCULATE(MAX(dimDate[Date]),FILTER(dimDate, dimDate[Date]<=EARLIER( dimDate[Date])))),dimDate[Ex.Rate])
Hi @Ashish_Mathur
No, it returns the same result as the original column with blanks on weekends and holidays.
Hi,
Share the link from where i can download your PBI file.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.