cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Deepan Frequent Visitor
Frequent 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

Accepted Solutions
Phil_Seamark Super Contributor
Super Contributor

Re: Set a maximum value for a decimal column

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

Phil_Seamark Super Contributor
Super Contributor

Re: Set a maximum value for a decimal column

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 Super Contributor
Super Contributor

Re: Set a maximum value for a decimal column

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

Phil_Seamark Super Contributor
Super Contributor

Re: Set a maximum value for a decimal column

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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 137 members 1,453 guests
Please welcome our newest community members: