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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Deepan
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
Phil_Seamark
Microsoft Employee
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


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

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


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Microsoft Employee
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


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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