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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Experts,
I am wondering why am I unable to use CALCULATE(), LOOKUPVALUE() functions while creating new columns?
I am working on a pbix file that sources the data from Power BI dataset and Dataflows.
When I test the same functions on pbix file that sources data from Excel source, they do work.
Are these functions restricted based on the datasource?
My appologies for my ignorance and it might be very basic question.
Appreciate your inputs.
Solved! Go to Solution.
HI @Anonymous,
Did you work on live mode? AFAIK, they limit the Dax functions usages to create calculate column/table. You can try to use the following formula to create a measure if helps:
Next Day =
VAR currDate =
MAX ( DispenseTable[Date] )
RETURN
CALCULATE (
MIN ( DispenseTable[Date] ),
FILTER ( DispenseTable, DispenseTable[Date] > currDate ),
VALUES ( DispenseTable[PatientId] ),
VALUES ( DispenseTable[MP] )
)
Regards,
Xiaoxin Sheng
@Anonymous , Dataset in live mode, you can not create new column.
dataset in direct query mode, you can only do limited operations.
Dataflow has the limitation of the direct query if you are doing direct query of dataflow
Power BI Decoding Direct Query: https://www.youtube.com/playlist?list=PLPaNVDMhUXGbKatyDdOhGbTL3xW2Xy6pA
Thanks @amitchandak
I am trying to achieve below but I get the message saying the CALCULATE is not a function.
Is there a way I can achieve below?
Next Day = CALCULATE(MIN(DispenseTable[Date]),FILTER(DispenseTable,DispenseTable[PatientId]=EARLIER(DispenseTable[PatientId])&&DispenseTable[MP]=EARLIER(DispenseTable[MP])&&DispenseTable[Date]>EARLIER(DispenseTable[Date])))
HI @Anonymous,
Did you work on live mode? AFAIK, they limit the Dax functions usages to create calculate column/table. You can try to use the following formula to create a measure if helps:
Next Day =
VAR currDate =
MAX ( DispenseTable[Date] )
RETURN
CALCULATE (
MIN ( DispenseTable[Date] ),
FILTER ( DispenseTable, DispenseTable[Date] > currDate ),
VALUES ( DispenseTable[PatientId] ),
VALUES ( DispenseTable[MP] )
)
Regards,
Xiaoxin Sheng
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!