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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ssommer123
New Member

How to find number of rate ids created by specific users + comparison of type text to numeric

Hello! I am struggling creating the DAX to find the number of rate ids (rate column from dispatch table) created by specific users (fullname column in users table). I keep getting an error: cant compare type numeric to type text. Here is the DAX: 

RatesCreatedByUser =
    CALCULATE(
        COUNTROWS(dispatch),
        FILTER(
            dispatch,
            dispatch[rate] = VALUE(users[fullname])
        )
    )
4 REPLIES 4
v-zhengdxu-msft
Community Support
Community Support

Hi @ssommer123 

 

What is the relationship between the two table 'dispatch' and 'users'.

Actually that while I've read your post once and once again, I can't understand the logic of the expected result.

If you don't want to provide your raw data, the sample could be okey, you can create some sample data, it would be helpful to find out the solution. 

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

JamesFR06
Resolver IV
Resolver IV

Ok. So do you have a UserID or something like this in the Dispatch Table ?

JamesFR06
Resolver IV
Resolver IV

Hi @ssommer123 

 

dispatch[rate] should be numeric and
VALUE(users[fullname]) should be text. The error message seems logical to me. Could you pease provide a sample of your data ?

Thank you for the response! I agree that the error makes sense, I am looking for a work around. I cant provide the sample data because the I want to keep the names private. Essentially, in the Dispatch table the "rate" column holds a ton of different rate ids. In the users table the "fullname" column contains all the usernames of employees. I am trying to find out how many rate ids all the fullnames have created. But it returns the error we mentioned, and i am looking for a work around for that. I feel like it should be relatively simple but i cant seem to find a way to produce this logic. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.