Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calculated column based on other columns

Hi 

here is my data set. i need to add calculated column based on the other two column."Place ""Status"

MonthPlaceStatus
MarchChennaiHigh
AprilChennaiLow
MayChennaiLow
MarchKolkataHigh
AprilKolkataHigh
MarchdelhiLow
AprildelhiLow
MaydelhiHigh
MarchMumbaiLow
MayMumbaiLow
MarchBangaloreLow
MayBangaloreLow

 

need my result column

MonthPlaceStatusResult
MarchChennaiHighHigh
AprilChennaiLowHigh
MayChennaiLowHigh
MarchKolkataHighHigh
AprilKolkataHighHigh
MarchdelhiLowHigh
AprildelhiLowHigh
MaydelhiHighHigh
MarchMumbaiLowLow
MayMumbaiLowLow
MarchBangaloreLowLow
MayBangaloreLowLow

 

ex - if i filter chennai ,the status column shows different status then the result will be "high".

 

can some one help to figure out the measure.

 

thanks

Kavitha 

  • Anonymous , Try a new column like

     


    new column =
    var _1 = countx(filter(Table, [Place] =earlier([place]) && [Status] ="High"),[Month])
    return
    if( isblank(_1), "Low", "High")

2 Replies

  • Anonymous , Try a new column like

     


    new column =
    var _1 = countx(filter(Table, [Place] =earlier([place]) && [Status] ="High"),[Month])
    return
    if( isblank(_1), "Low", "High")

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks Amit.. its working.