Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Mons_Aku
New Member

How can I change values in a calculated column?

Hi! I have a calculated column "Days To Ship" (a product) with data type "Whole number".  Some values here are incorrect for example -34568. Every value has to be at least 1.

I want to create a Gauge:

and I can't use the "Filters" panel.

 

Mons_Aku_0-1675093268912.png

 

Can someone please help me? Thank you in advance!

6 REPLIES 6
IoannisPhilip
Advocate II
Advocate II

Hi @Mons_Aku ,

You can go to the fields panel, click the 3 dots, and then "edit query". Then you click on the gear icon next to "source".

IoannisPhilip_0-1675093779437.png

This will open your table in an edible version, where you can double-click on the entry you want to alternate manually.

All this assuming that you know which are the right values. Alternatively, you can just apply a filter only on the specific visual with data being "greater or equal to" 1. 

IoannisPhilip_1-1675094112404.png
Let me know if I can support you further.

Best of luck,
Ioannis

 




Thank you, but as I said I can't use the Filter panel since It's a Gauge visual and nor the Source since It's a calculated column. It doesn't show in Power Query Editor.

Greg_Deckler
Super User
Super User

@Mons_Aku What is your formula?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

For my calculated column?

DaysToShip = Orders[ShippedDate] - Orders[OrderDate]
 
Mons_Aku_0-1675095799424.png

You can see the incorrect values above.

hi @Mons_Aku 

try like,

DaysToShip = 
VAR _value =
Orders[ShippedDate] - Orders[OrderDate]
RETURN
IF(_value<1, 1, _value)

That was it! Thank you! 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.