cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Regular Visitor

## Set a maximum value for a decimal column

I have a decimal column in my table which can have values in the range 0-200. But When ploting in a line graph I want the maximun value to be 100. For example let's say there is a value in that column which is 150, I want it to be 100 in the graph visual. All the values above 100 should be displayed as 100. This is not same as setting a filter and excluding all the values above 100. I need the values chopped to 100. Any idea how to do this?

2 ACCEPTED SOLUTIONS
Microsoft Employee

Hi @Deepan

You could try a calculated measure like this.

```Measure =
VAR coreMeasure = CALCULATE(SUM('Table2'[Values]))

RETURN
IF(
coreMeasure>100,
-- THEN --
100,
-- ELSE --
coreMeasure
)```

You can apply the same approach on a Calculated Column if you prefer

Proud to be a Datanaut!

Microsoft Employee

Just replace the code for the core measure with your own code.

Proud to be a Datanaut!

2 REPLIES 2
Microsoft Employee

Hi @Deepan

You could try a calculated measure like this.

```Measure =
VAR coreMeasure = CALCULATE(SUM('Table2'[Values]))

RETURN
IF(
coreMeasure>100,
-- THEN --
100,
-- ELSE --
coreMeasure
)```

You can apply the same approach on a Calculated Column if you prefer

Proud to be a Datanaut!

Microsoft Employee

Just replace the code for the core measure with your own code.

Proud to be a Datanaut!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors