I have a column with some values containing Negatives and "NAH"
How can i turn those negative numbers and "nah to 0
that is, anytime the result in this column show a negative value or "nah" ti should automatically convert it to 0
It didnt work for me.
I have a table with 5 columns spooled from a source. So i added "sales" Column to the table.
Sales Column is the result of the calculation of ColumnA divided by 2
So what I want is, how to turn "Nah" and all the negative numbers(See Screenshot below) to Zero (0)
Assuming the Sales column was created in the Query Editor AND you want to get the desired result in the Query Editor itself, write this Custom column formula in the Query Editor
=if [Sales]="NaH" or [Sales]<0 then 0 else [Sales]
If you want to get the resutl in the Data Model, then write this calculated column formula
Hope this helps.
Does this calculated column formula work?
Share the download link of the PBI file with the formula already written (the one that yields an error).
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!