Forum Discussion
Replace exact one null in column.
- 4 years ago
Anonymous you can't replace it but you can add a new column in PQ or DAX with a logic that will create the column you need. The logic will require that the row will have something that will distinguish it from the other rows in your table
- 4 years ago
Are the values in the other columns unique? Meaning could you create a conditional column (either in Power Query or data view) to add in your value? Something like this: = IF( [unique column] = ABC), 25000$, [Price]
Anonymous maybe based on logic that will take account other columns if they differ in a way you can control which null will be replaced.
Can you share an example data and what you want to achieve
I described my problem incorrectly. From the beginning. The data source is MS SQL, after downloading the data to PowerBI, I want to do data transformation in Power Query. One of the columns has missing data (nulls), which I would like to fill with different values. I can't do it in MS SQL because I don't have proper access to DML operations. The problem is that I can't change exactly one cell with a null value. Option replace the value replaces all nulls in the entire column.
This is example of a column that I have in my table:
| Price | ||
| 15000$ | ||
| null | ||
| 10000$ | ||
| null |
|
| null | ||
| null |
|
| 45000$ |
|
And this is what I want to achvieve:
| Price | ||
| 15000$ | ||
| null | ||
| 10000$ | ||
| null |
|
| 25000$ | ||
| null |
|
| 45000$ |
|
- SpartaBI4 years ago
Community Champion
Anonymous you can't replace it but you can add a new column in PQ or DAX with a logic that will create the column you need. The logic will require that the row will have something that will distinguish it from the other rows in your table
- Anonymous4 years agoNot applicable
Just as I thought. Great! Thanks for help!
- SpartaBI4 years ago
Community Champion
Anonymous my pleasure 🙂
Check out my showcase report - got some high level stuff there. Sure you will find there a lot of cool ideas.
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂