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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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 I
Advocate I

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!:
Mastering Power BI 2nd Edition

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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