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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
Krijgersss
Helper II
Helper II

need some help with a measure error

hello does anybody hace the right measure for me so this measure works it gives me now a error 

Meting 2 = CALCULATE(DISTINCTCOUNT('public transaction_lines'[entry_number]), ISBLANK('public transaction_lines'[cost_center_description]),'public glaccount_classification_mappings'[classification_description] - "Cost of goods sold")
 
see screenshot for error 
Krijgersss_0-1716979360881.png

 

3 REPLIES 3
DataNinja777
Super User
Super User

Hi @Krijgersss 

What about swapping "-" with "=" in your dax formula like yellow highlighted below:

DataNinja777_0-1716985694516.png

Best regards,

the - is a = 7so thats not the problem 

Anonymous
Not applicable

@DataNinja777  Thanks for your contribution on this thread.

Hi @Krijgersss ,

Upon analysis of the error message, it appears to be indicative of a data type conversion issue. As recommended by @DataNinja777 , it would be beneficial to replace the minus sign(-) with an equal sign(=). It’s important to note that both ‘public glaccount_classification_mappings’[classification_description] and “Cost of goods sold” are Text types, hence the use of a minus sign between them is not suitable

 

However, from your latest reply, the minus sign over here would have been an equal sign. That should return the result you want. If it still reports an error, could you please provide the following information:
1. What is the Data type  of the field 'public transaction_lines'[cost_center_description]  and 'public glaccount_classification_mappings'[classification_description] ?

2. What is the error message?
3. Please provide some raw data in your table 'Revenue' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

Best Regards

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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