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
Yiyi
Helper I
Helper I

A table created by table function can not be used in VALUE() function?

Hello, this is my code and to me, it looks all fine, but the error message said that Cannot find table 'AISearchUsers' when I used it with VALUE() after RETURN hoping to use it as a list to filter my table. Can you tell me why? The options to VALUE() seems to be all original tables but not the one I just created with the VAR. 

 

Count_users_who_only_use_keyword_search =
VAR AISearchUsers =
    SUMMARIZE(
        FILTER('Query 3', 'Query 3'[IsAISearch] = "true"),
        'Query 3'[user_Id]
    )
RETURN
CALCULATE(
    DISTINCTCOUNT('Query 3'[user_Id]),
    FILTER(
        AISearchUsers,
        NOT('Query 3'[user_Id] IN VALUES(AISearchUsers[user_id]))
    ),
    'Query 3'[IsAISearch] = "false"
)

Thanks!  

1 ACCEPTED SOLUTION

@Yiyi 

 

try this 

Make yourCount_users_who_only_use_keyword_search =
VAR AISearchUsers =
    SUMMARIZE (
        FILTER (
            'Query 3',
            'Query 3'[IsAISearch] = "true"
        ),
        'Query 3'[user_Id]
    )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'Query 3'[user_Id] ),
        FILTER (
            'Query 3',
            NOT ( [user_Id] IN AISearchUsers )
        ),
        'Query 3'[IsAISearch] = "false"
    )

Regards,
Nandu Krishna

View solution in original post

4 REPLIES 4
nandukrishnavs
Community Champion
Community Champion

@Yiyi  Try this 

 

 

 

 

Make yourCount_users_who_only_use_keyword_search =
VAR AISearchUsers =
    SUMMARIZE (
        FILTER (
            'Query 3',
            'Query 3'[IsAISearch] = "true"
        ),
        'Query 3'[user_Id]
    )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'Query 3'[user_Id] ),
        FILTER (
            AISearchUsers,
            NOT (
                VALUES ( 'Query 3'[user_Id] )
                    IN AISearchUsers
            )
        ),
        'Query 3'[IsAISearch] = "false"
    )

 

 


Regards,
Nandu Krishna

Thanks for your reply! I really appreciate it! Now this code seems ok, but I can not add it to an visualization and it throws out such error message that: 

 

Yiyi_0-1691388563145.png

I tried to use the VAR to create a list of users who have used the AI search function and then in the RETURN I tried to get a list of users who have not used yet the AI search function but who has used the Keyword function. Many users who have used both search functions. 

 

Can you give me some idea about where the issue of the code can be? Thanks a lot!

 

@Yiyi 

 

try this 

Make yourCount_users_who_only_use_keyword_search =
VAR AISearchUsers =
    SUMMARIZE (
        FILTER (
            'Query 3',
            'Query 3'[IsAISearch] = "true"
        ),
        'Query 3'[user_Id]
    )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'Query 3'[user_Id] ),
        FILTER (
            'Query 3',
            NOT ( [user_Id] IN AISearchUsers )
        ),
        'Query 3'[IsAISearch] = "false"
    )

Regards,
Nandu Krishna

It works! Appreciate your time and attention 🙂 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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