Forum Discussion
ABC11
Resolver I
4 years agoNeed help on DAX function with measure vs column
Hello, Lastest_WorkDate = CALCULATE(MAX(LEM_FACTS[WORKDATE]))-this is measure column NO_OF_DAYS_Running Behind = DATEDIFF(LEM_FACTS[Lastest_WorkDate],TODAY(),DAY)-this is measure column Lev...
SpartaBI
Community Champion
4 years agoHey ABC11 ,
Just wrtie this funcion in a new column (I've put everyhing in one column):
Level 1 =
VAR _Lastest_WorkDate = LEM_FACTS[WORKDATE]
VAR _Diff = DATEDIFF(Lastest_WorkDate,TODAY(),DAY)
VAR _Result =
switch(
true(),
Just wrtie this funcion in a new column (I've put everyhing in one column):
Level 1 =
VAR _Lastest_WorkDate = LEM_FACTS[WORKDATE]
VAR _Diff = DATEDIFF(Lastest_WorkDate,TODAY(),DAY)
VAR _Result =
switch(
true(),
_Diff < 4,"GOOD",
_Diff<7,"Email Vendor",
_Diff<21,"Action Immediately",
_Diff<61,"Check to see if it's on site",
"Off Site")
RETURN
_Result
Hope this helps
_Diff<21,"Action Immediately",
_Diff<61,"Check to see if it's on site",
"Off Site")
RETURN
_Result
Hope this helps
ABC11
Resolver I
4 years agoHello,
I am getting this error" Failed to resolve name 'LEM_FACTS'. It is not a valid table, variable, or function name." My table bname is this for sure
Please
Thanks for your time
- SpartaBI4 years ago
Community Champion
Strange. Can you share your file here?
- SpartaBI4 years ago
Community Champion
Check now, had a typo, I edited it
- ABC114 years ago
Resolver I
Thanks its worked.
but something is not working. Total I have 102 contract.
- SpartaBI4 years ago
Community Champion
I need more info.
Pay attenation that the solution was for a calculated column. Check that the result is correct in the data tab view. You showes a screenshot of a visual which is an aggregation on top of what we did and it depends on the filter context generated by the visual and also on the summarization of the column ( i see count, maybe you wanted sum)