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
jms1425
New Member

Limiting Value of a New Measure

Good morning,

 

I have a dashboard that displays a weekly rate of completion of a task for the prior year, and I want to display a goal for the current year, based on the prior year. If the goal is to increase by 10%, but last year's value is >90%, the goal is >100% Is there a way to limit the maximum value of the goal?

 

Thanks!

2 ACCEPTED SOLUTIONS
ssugar
Resolver III
Resolver III

 

after you calculate your current year goal, you should be able to use an if statement.  Something like:

 

adjustedcurrentyeargoal = if([currentyeargoal] > 1, 1, [currentyeargoal])

 

this assumes your currentyeargoal measure is formatted as a percent, and the value is actually between 0 and 1

 

let me know if you need any further clarification

View solution in original post

No worries.  You could also wrap it all into one DAX statement.  Something like this:

 

CurrentYearGoal = 
var __currentyeargoal = [your calculation to get the current year goal]
return if([__currentyeargoal] > 1, 1, [__currentyeargoal])

 

View solution in original post

3 REPLIES 3
ssugar
Resolver III
Resolver III

 

after you calculate your current year goal, you should be able to use an if statement.  Something like:

 

adjustedcurrentyeargoal = if([currentyeargoal] > 1, 1, [currentyeargoal])

 

this assumes your currentyeargoal measure is formatted as a percent, and the value is actually between 0 and 1

 

let me know if you need any further clarification

Ah, yes - create a new measure for the goal, then create 2nd new measure with the IF statement, and display the 2nd measure. It seems so obvious now!

 

Thanks!

No worries.  You could also wrap it all into one DAX statement.  Something like this:

 

CurrentYearGoal = 
var __currentyeargoal = [your calculation to get the current year goal]
return if([__currentyeargoal] > 1, 1, [__currentyeargoal])

 

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.