Forum Discussion

tkavitha911's avatar
tkavitha911
Helper III
1 year ago
Solved

urgent help needed


AdjustedArrivalDate1 =
VAR ETA = MAXX(
    FILTER(Inbound_Query, NOT(ISBLANK(Inbound_Query[Max of ETA]))),
    Inbound_Query[Max of ETA]
)
VAR ClearanceDays = MAX(Inbound_Query[Clearence days])
VAR TargetDate = ETA + ClearanceDays

VAR ContainersOnDate =
    CALCULATE(
        COUNTROWS(Inbound_Query),
        Inbound_Query[Max of ETA] = TargetDate
    )

VAR Capacity = MAX(Inbound_Query[Capacity])

RETURN
IF(ContainersOnDate > Capacity, TargetDate + 1, TargetDate)

getting this error pls help
The following syntax error occurred during parsing: Invalid token, Line 3, Offset 2,  .
  • Hi tkavitha911 ,

     

    You don't need to declare the table name in an X-Function as you're iterating over a virtual table that you've created, not the actual base table.
    Try deleting the table reference here:

     

     

    Pete

     

5 Replies

  • Hi tkavitha911 

    The error you are seeing,,,,,,,,,,,,,,,,,,,,,,,typically means there is a problem with the DAX syntax, or misplaced commas, parentheses..


    Ensure that 
    1. Column name, measure and table are correctly written.

     

    If still getting issue then 
    1. Then test the each var separately.

    If this answers your questions, kindly accept it as a solution and give kudos.

  • Hi tkavitha911 ,

     

    You don't need to declare the table name in an X-Function as you're iterating over a virtual table that you've created, not the actual base table.
    Try deleting the table reference here:

     

     

    Pete

     

  • v-saisrao-msft's avatar
    v-saisrao-msft
    Community Support

    Hi tkavitha911,
    I wanted to check if you had the opportunity to review the information provided by BA_Pete,mdaatifraza5556 . Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
    Thank you.

  • v-saisrao-msft's avatar
    v-saisrao-msft
    Community Support

    Hi tkavitha911,

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.

  • v-saisrao-msft's avatar
    v-saisrao-msft
    Community Support

    Hi tkavitha911,

     

    We haven’t heard back from you regarding your issue. If it has been resolved, please mark the helpful response as the solution and give a ‘Kudos’ to assist others. If you still need support, let us know.

     

    Thank you.