none
SSAS Tabular Model RRS feed

  • Question

  • Hi 

    Please help me anyone

     I have to derive calculated column in tabular model based on another column 

    I need Flag status as 1 and 0 

    my column having different data with string type form that i need to derive column 

    i am trying but i am unable to get this 

    Please help me 

    sreni


    Sreeni

    Thursday, March 6, 2014 6:15 AM

Answers

  • Hi,

      On my quick test below is the work around i could see as there is no straight forward conversion is available

    IF(ISNUMBER(Sheet1[column]),Sheet1[column]*1,0)

     Use the above expression to convert the string into number. This will change the non numeric values to 0.


    Best Regards Sorna

    Thursday, March 6, 2014 11:07 AM
  • Hi Sreni,

    First convert the value of this column to integer data type using sorna's expression. And then add calculated column to your tabular model to show the Flag status as 1 and 0 based on the converted column. Here is a blog about how to add calculated column and measure to tabular model step by step, please refer to the link below.

    Add Calculated Column and Measures to Tabular Model

    Regards,


    Charlie Liao
    TechNet Community Support

    Friday, March 7, 2014 9:32 AM
    Moderator

All replies

  • Hi,

      On my quick test below is the work around i could see as there is no straight forward conversion is available

    IF(ISNUMBER(Sheet1[column]),Sheet1[column]*1,0)

     Use the above expression to convert the string into number. This will change the non numeric values to 0.


    Best Regards Sorna

    Thursday, March 6, 2014 11:07 AM
  • Hi Sreni,

    First convert the value of this column to integer data type using sorna's expression. And then add calculated column to your tabular model to show the Flag status as 1 and 0 based on the converted column. Here is a blog about how to add calculated column and measure to tabular model step by step, please refer to the link below.

    Add Calculated Column and Measures to Tabular Model

    Regards,


    Charlie Liao
    TechNet Community Support

    Friday, March 7, 2014 9:32 AM
    Moderator
  • You should be able to do this in a calculated column with a simple IF()

    eg.

    IF( myTable[Other Column] = "Test", 1, 0)


    http://darren.gosbell.com - please mark correct answers

    Friday, March 7, 2014 9:36 AM
    Moderator