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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Extract date from text

Hello All,

 

I have a stand alone table in Live connection to tabular model. I am trying to create a report level measure as i dont have access to Tabular model.

 

I have a column FX_DATEKEY but the value appears like below. I am trying to extract the date from that column, another catch is FX_DATEKEY is read only column.

 

Current FX rate USD        FX_DATEKEY
1.7888                         fxrates.br-20120101

 

I tried, this, 

DateFx =
RIGHT('HFM FX Rate Actual'[FX_DATEKEY],8)
 
But this is not working, can you please?
1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Sorry for the miss direction but when handling with live connections on tabular models some expressions are not valid try the following:

 

DateFx =
RIGHT ( LASTNONBLANK ( 'HFM FX Rate Actual'[FX_DATEKEY], 0 ), 8 )

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

6 REPLIES 6
MFelix
Super User
Super User

Hi @Anonymous ,

 

Since you are using a measure you need to give grouping to your measure try to use the following measure:

DateFx =
RIGHT(SELECTEDVALUE('HFM FX Rate Actual'[FX_DATEKEY]),8)

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Anonymous
Not applicable

Thank you so much for quickly looking into this.

 

I tried the below, it fails at SELECTEDVALUE, i tried ALLSELECTED instead of SELECTEDVALUE, the error disappeared, however i got an error. "Calculation error in Measure: A table of multiple values was supplied where a single value was expected", can you please help?

 
DateFx = 
RIGHT(SELECTEDVALUE('HFM FX Rate Actual'[FX_DATEKEY]),8

Hi @Anonymous ,

 

Try to use the:

DateFx = RIGHT(MAX('HFM FX Rate Actual'[FX_DATEKEY]),8)

 

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Hi @Anonymous ,

 

Sorry for the miss direction but when handling with live connections on tabular models some expressions are not valid try the following:

 

DateFx =
RIGHT ( LASTNONBLANK ( 'HFM FX Rate Actual'[FX_DATEKEY], 0 ), 8 )

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Anonymous
Not applicable

Thank you so much it worked.

Anonymous
Not applicable

It wasnt working and returns the error below.  😞

err.PNG

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.