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).
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.