Forum Discussion

Nekkar's avatar
Nekkar
New Member
4 years ago
Solved

Dax data type identyfication, data type format change

Hi All,

1) is there any dax function which would help me identify data type of a data in column?

     Eg. CheckDataType( 'Data'[Date])

 

2) I would like to convert values in 2 columns in two tables to create relationship between 2 tables (I can use Dax only 🙂

I've already gave it a solid try with no success so any idea is welcome.

I would be thrilled to see sth like cast in SQL.

 

 

  • Hi Nekkar ,

     

    In that case this should work, create a new column:

    NewDate = DATE(RIGHT(Sales[SDate],4),MID(Sales[SDate],4,2),LEFT(Sales[SDate],2))
     
    Jori
     
    If I answered your question, please mark it as a solution to help other members find it more quickly.

4 Replies

  • jppv20's avatar
    jppv20
    Solution Sage

    Hi Nekkar ,

     

    Do you really need this to work using DAX? Otherwise when you select a Column and go to Column tools you can see & edit the Data type here:

     

    Jori

     

    If I answered your question, please mark it as a solution to help other members find it more quickly.

     

  • Yes, I really do. I do not have access to options you show. I cannot change anything.

    And I would like to use columns from the example to create a relationship so I need to have them as the same data type.

    • jppv20's avatar
      jppv20
      Solution Sage

      Hi Nekkar ,

       

      In that case this should work, create a new column:

      NewDate = DATE(RIGHT(Sales[SDate],4),MID(Sales[SDate],4,2),LEFT(Sales[SDate],2))
       
      Jori
       
      If I answered your question, please mark it as a solution to help other members find it more quickly.