Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
98 | |
80 | |
76 | |
66 |
User | Count |
---|---|
135 | |
109 | |
104 | |
83 | |
73 |