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
miftah_02
Frequent Visitor

DAX error

Hi All

 

I'm trying to use this function ...

_Gr_Numeric = CONVERT(LEFT(TExportDataMS_Daily[_Gr],LEN(TExportDataMS_Daily[_Gr])-1),INTEGER)
 
but I just get this error message bellow:
 An argument of function 'LEFT' has the wrong data type or has an invalid value
 
And also I'm trying to use this function
_MT = (TExportDataMS_Daily[Sales Qty]*TExportDataMS_Daily[_Gr_Numeric])/10^6

And i get this error message bellow:
This expression refers to a Column Object named 'TExportDataMS_Daily[_Gr_Numeric])', which has an error.


Can anyone help?

Thanks in advance!

2 REPLIES 2
amitchandak
Super User
Super User

@miftah_02 , see fine may be a data type issue

Try like

Gr_Numeric = LEFT(TExportDataMS_Daily[_Gr]&"",LEN(TExportDataMS_Daily[_Gr]&"")-1)*1

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Thank you for the answer, i try but is not working

miftah_02_0-1661228406003.png

 

i have Gr clumn like this

miftah_02_1-1661228522910.png


And I want to make Gr numeric, but the syntax erorr like this

miftah_02_2-1661228719812.png

 



Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors