Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
tkavitha911
Helper III
Helper III

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,  .
1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

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:

 

BA_Pete_1-1748412609057.png

 

Pete

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

5 REPLIES 5
v-saisrao-msft
Community Support
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.

v-saisrao-msft
Community Support
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
Community Support
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.

BA_Pete
Super User
Super User

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:

 

BA_Pete_1-1748412609057.png

 

Pete

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




mdaatifraza5556
Super User
Super User

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.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.