Forum Discussion
Anonymous
4 years agoNot applicable
Calculate function and direct
Hi all, I'm trying to recreate a report. Right now I've made it with imported data from SQL but the new report is set to use Direct Query. Previously I requested a solution for this issue: ht...
tamerj1
Community Champion
4 years agoHi Anonymous
Plrease try
Earleist Start =
CALCULATE (
MIN ( 'Table2'[Timestamp] ),
'Table2'[Timestamp Code] = "Start",
REMOVEFILTERS ( 'Table1' ),
VALUES ( 'Table1'[Prod No] )
)Anonymous
4 years agoNot applicable
Hi tamerj1 ,
Thansk for your response!
Unfortunately I'm not able to use the CALCULATE function when using Direct Query.
I get this error: "Function 'CALCULATE' is not allowed as part of calculated column DAX expressions on DirectQuery model".
Hence the issue as the first solution worked with imported data.
- tamerj14 years ago
Community Champion
Anonymous
Please try
Earleist Start = MINX ( FILTER ( ALL ( 'Table2' ), 'Table2'[Timestamp Code] = "Start" && 'Table2'[Prod No] = SELECTEDVALUE ( 'Table2'[Prod No] ) ), 'Table2'[Timestamp] )- Anonymous4 years agoNot applicable
Hi tamerj1
The MINX function is not supported either.
Unfortunately I still seem to be stuck.
Thanks for your help!
- tamerj14 years ago
Community Champion
Anonymous
Please tryEarleist Start = SELECTCOLUMNS ( SUMMARIZE ( FILTER ( ALL ( 'Table2' ), 'Table2'[Timestamp Code] = "Start" && 'Table2'[Prod No] = SELECTEDVALUE ( 'Table2'[Prod No] ) ), 'Table2'[Prod No], "@TimeStamp", MIN ( 'Table2'[Timestamp] ) ), "@@TimeStamp", [@TimeStamp] )