Forum Discussion

Krijgersss's avatar
Krijgersss
Icon for Helper II rankHelper II
2 years ago

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 

 

3 Replies

  • Hi Krijgersss 

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

    Best regards,

    • Krijgersss's avatar
      Krijgersss
      Icon for Helper II rankHelper II

      the - is a = 7so thats not the problem 

      • Anonymous's avatar
        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