Forum Discussion

AndreasFu's avatar
AndreasFu
Frequent Visitor
3 years ago
Solved

How to manually change a specific cell?

Hi,

I have a problem where I dont get the correct data from third party. I can´t manually edit the source (csv file) since we download a new version of it every 12 hours. So my idea was to manually set the value in power bi.

I have two rows with null values:

If I click the cell that I wanna change and choose replace values

And there set the value I want, it changes null values to the value I set in that colum and not only the specific cell. Since I have 2 null values in that colum it set both values to the value I choose. But I want the cells to have two diffrent values. Can this be done?

Here it shows when I try to change one cell to GRAMPIAN and it changes both cells in that colum.

 

  • Hi!

     

    The easier way to accomplish what you want is first you replace for a standard value, then use the formula bar to edit the code, something like, for example:

     

    From:

    = Table.ReplaceValue(
    #"Last Step",
    null,
    "standard",
    Replacer.ReplaceValue,
    {"ColumnToReplace"}
    )

    To:
    = Table.ReplaceValue(
    #"Last Step",
    null,
    each if [ColumnToAnalyze] = "Value" then "Answer 1" else "Answer,
    Replacer.ReplaceValue,
    {"ColumnToReplace"}
    )

     

    If you have trouble to define the expression to replace (bold snippet), create a new column to form the value, then use it here.

    Hope I helped you!

2 Replies

  • Hi!

     

    The easier way to accomplish what you want is first you replace for a standard value, then use the formula bar to edit the code, something like, for example:

     

    From:

    = Table.ReplaceValue(
    #"Last Step",
    null,
    "standard",
    Replacer.ReplaceValue,
    {"ColumnToReplace"}
    )

    To:
    = Table.ReplaceValue(
    #"Last Step",
    null,
    each if [ColumnToAnalyze] = "Value" then "Answer 1" else "Answer,
    Replacer.ReplaceValue,
    {"ColumnToReplace"}
    )

     

    If you have trouble to define the expression to replace (bold snippet), create a new column to form the value, then use it here.

    Hope I helped you!

    • AndreasFu's avatar
      AndreasFu
      Frequent Visitor

      Thank you so much, I've will try this out.