Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I need to roundup a number, but only from June onwards. For the other previous months of 2020, I don't want it to be rounded. I would like to do this within Power Query.
It's possible?
Example:
Solved! Go to Solution.
Hi @Anonymous - use this formula:
= if [Date] > #date(2020,5,31) then Number.Round([Value], 1) else [Value]
Just change the Number.Round() function to round to the number of decimal places you want, and adjust the #date() function as necessary. This will round all dates after May 31, 2020 to 1 decimal place, and for all other values, it will keep the original.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @Anonymous - use this formula:
= if [Date] > #date(2020,5,31) then Number.Round([Value], 1) else [Value]
Just change the Number.Round() function to round to the number of decimal places you want, and adjust the #date() function as necessary. This will round all dates after May 31, 2020 to 1 decimal place, and for all other values, it will keep the original.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThank you @edhans. This will work for me, but is it possible to do this without creating a new column?
I'm sorry if my question is so basic, but I'm still learning M Language.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.