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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
roger360
Frequent Visitor

Getting Syntax Error: Invalid Token, Line 3, Offset2, .

TopTeam =
VAR TopTeamTable =
    ADDCOLUMNS(
        SUMMARIZE(
            FILTER(
                Table15924,
                NOT(ISBLANK(Table15924[Redirection to?]))
            ),
            Table15924[Redirection to?]
        ),
        "Count", COUNTROWS(Table15924)
    )
VAR MaxCount = MAXX(TopTeamTable, [Count])
RETURN
    CALCULATE(
        FIRSTNONBLANK(Table15924[Redirection to?], 1),
        FILTER(TopTeamTable, [Count] = MaxCount)
    )


Th above new measure is to find the most frequest team where the calls were redirected to, excluding the blank cells. Getting the following error message. Please help! Let me know if you need any further details.

roger360_0-1744223390319.png

 



1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

Hi @roger360 ,
Here’s a corrected version of your measure:

TopTeam = 
VAR TopTeamTable =
    ADDCOLUMNS(
        SUMMARIZE(
            FILTER(
                Table15924,
                NOT(ISBLANK(Table15924[Redirection to?]))
            ),
            Table15924[Redirection to?]
        ),
        "Count", CALCULATE(COUNTROWS(Table15924))
    )
VAR MaxCount = MAXX(TopTeamTable, [Count])
RETURN
    CALCULATE(
        FIRSTNONBLANK(Table15924[Redirection to?], 1),
        FILTER(TopTeamTable, [Count] = MaxCount)
    )

 

Passionate about leveraging data analytics to drive strategic decision-making and foster business growth.

Connect with me on LinkedIn: Rohit Kumar.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

6 REPLIES 6
v-nmadadi-msft
Community Support
Community Support

Hi @roger360 ,

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


Thank you.

v-nmadadi-msft
Community Support
Community Support

Hi @roger360 

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.

 

rohit1991
Super User
Super User

Hi @roger360 ,
Here’s a corrected version of your measure:

TopTeam = 
VAR TopTeamTable =
    ADDCOLUMNS(
        SUMMARIZE(
            FILTER(
                Table15924,
                NOT(ISBLANK(Table15924[Redirection to?]))
            ),
            Table15924[Redirection to?]
        ),
        "Count", CALCULATE(COUNTROWS(Table15924))
    )
VAR MaxCount = MAXX(TopTeamTable, [Count])
RETURN
    CALCULATE(
        FIRSTNONBLANK(Table15924[Redirection to?], 1),
        FILTER(TopTeamTable, [Count] = MaxCount)
    )

 

Passionate about leveraging data analytics to drive strategic decision-making and foster business growth.

Connect with me on LinkedIn: Rohit Kumar.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
Deku
Community Champion
Community Champion

Try this

 

TopTeam =
VAR TopTeamTable =
ADDCOLUMNS(

Filter(

ALL(Table15924[Redirection to?]),

Not ISBLANK(Table15924[Redirection to?])

),
"@Count", CALCULATE(COUNTROWS(Table15924))
)

Return

MAXX( 
TOPN(1, TopTeamTable, [@Count], DESC),

Table15924[Redirection to?]

)


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
roger360
Frequent Visitor

Its showing error:

roger360_0-1744508849002.png

 

Deku
Community Champion
Community Champion

Added a missing comma, need on row 11 on your image


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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