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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
adityapedapudi
Advocate I
Advocate I

Unable to use string columns in any way in DirectQuery mode.

Hi guys,

 

I'm using direct query to get the data from an OLAP cube. The columns Dim_date, Fiscal_year, Fiscal_week, FY, FP, etc are not available in the DAX expression box when typing. This the error i get when i give the expression :

dim_month_1 = MONTH('time'[Dim_date])

The error:  (here the [Dim_date] column is a date column in string format)error msg.PNGAfter spending some time researching i was able to learn that i need to aggregate, so i used the following expression:

=SUM('Time'[FP])

As you can see the column 'FP' is just a value in string format, but it still shoes this error:error msg2.PNG

 

And when i try and convert it into a value by using the expression:

=VALUE(SUM('Time'[FP]))

This is the error: 

error msg3.PNGPlease help, i'm new so if i made a silly mistake, forgive me.

 

Thanks

 

2 REPLIES 2
wilson_smyth
Post Patron
Post Patron

what is the format of the FP column in the cube?

if its a string  you may need to convert it to a number. Unsure of your system but StrToValue might help, or be a starting point.

I believe StrToValue is not part of DAX's functions and I don't have access to the cube, so there's no way of knowing the format through the backdoor or any way

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.