Forum Discussion

AmberGardner's avatar
AmberGardner
Frequent Visitor
1 year ago
Solved

New Column not working

Hi i am currently trying to get a new column on my report that shows if these cases were withdrawn. Basically what i need is below: 
 
Column name: Withdrawn
IF: [Approved_Refused_Other] is Withdrawn then return "Yes", else return "No
 
Obviously i know that the above isnt going to work because it is massively incorrect and not the right format for the column, but this is the information that i need to pull and for some reason it is not working for me on PowerBI. 
 
If someone could also explain how to expand on this, such as: If XXX then return XXX, else if YYY then return YYY, else return ZZZ, that would be amazing thank you! โค๏ธ
 
I am still very new to this and am still learning, so i understand that this may seem like a stupid question but its something that i cant wrap my head around!
  • Hello AmberGardner,

    You can use Power Query(Transform Data) or DAX(New Column):
    PQ example:
    if [column] = 4 then "A"
    else if [column] = 2 then "C"
    else "B"

    DAX(new column) example:
    IF(
    'Y Axis'[Y Axis] = 1,
    "A",
    IF(
    'Y Axis'[Y Axis] = 2,
    "C",
    "B")
    )

    Kind Regards,
    Gรถkberk UzuntaลŸ

    ๐Ÿ“Œ If this post helps, then please consider Accepting it as a solution and giving Kudos โ€” it helps other members find answers faster!

    ๐Ÿ”— Stay Connected:
    ๐Ÿ“˜ Medium |
    ๐Ÿ“บ YouTube |
    ๐Ÿ’ผ LinkedIn |
    ๐Ÿ“ท Instagram |
    ๐Ÿฆ X |
    ๐Ÿ‘ฝ Reddit |
    ๐ŸŒ Website |
    ๐ŸŽต TikTok |



2 Replies

  • Hello AmberGardner,

    You can use Power Query(Transform Data) or DAX(New Column):
    PQ example:
    if [column] = 4 then "A"
    else if [column] = 2 then "C"
    else "B"

    DAX(new column) example:
    IF(
    'Y Axis'[Y Axis] = 1,
    "A",
    IF(
    'Y Axis'[Y Axis] = 2,
    "C",
    "B")
    )

    Kind Regards,
    Gรถkberk UzuntaลŸ

    ๐Ÿ“Œ If this post helps, then please consider Accepting it as a solution and giving Kudos โ€” it helps other members find answers faster!

    ๐Ÿ”— Stay Connected:
    ๐Ÿ“˜ Medium |
    ๐Ÿ“บ YouTube |
    ๐Ÿ’ผ LinkedIn |
    ๐Ÿ“ท Instagram |
    ๐Ÿฆ X |
    ๐Ÿ‘ฝ Reddit |
    ๐ŸŒ Website |
    ๐ŸŽต TikTok |



  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi AmberGardner ,

     

    Have a good day. Did the above reply help you resolve your issue? If so, please consider marking it as a solution. Thank you!

     

    Best Regards,

    Wearsky