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! Request now
Hi, I am having table with calculating quantity based on last date in table.
According to this example I should get 1, because last date is 2022-08-26, and at first line quantity is 1. Unfortunately,
I am getting all sum of column - 32, when I expected 1. My measure:
kiekis_test1 =
var __LastDate = LASTDATE(op_detales[Dokumento data])
RETURN
CALCULATE(
CALCULATE(sum(op_detales[qty_in]), FILTER(op_detales,op_detales[Dokumento data]=[_m_date_A]&& op_detales[modul]="Pirkimai"))
)So how to fix my measure?
hi @Analitika
is seems your VAR is not in use. try like:
kiekis_test1 =
var __LastDate = LASTDATE(op_detales[Dokumento data])
RETURN
CALCULATE(
sum(op_detales[qty_in]),
FILTER(
op_detales,
op_detales[Dokumento data]=__LastDate
&& op_detales[modul]="Pirkimai"
)
)
I tried but getting null result:
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.