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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Alpesh
Helper I
Helper I

Target based on % inc/dec last year - but trended by month

Hi, We have a target which is to decrease by 10% from previous year.

 

I've created my target measure which works fine and using this in the Gauge visual vs. actuals: 

Target Phone AHT =
VAR TenPc = [Ave. Phone AHT - Last Year]*0.1
Return  [Ave. Phone AHT - Last Year]-TenPc
 
The challenge now comes, that we need to visual this target vs. actuals per month. And be able to filter by Country. If I use the target measure in a line chart by month, the target is taking 10% per month of the previous year. Instead it should be flat (the same number) across the year. How do I make the target ignore month context as the target should be flat. 
 
I tried adding  ALLEXCEPT YEAR in the return statement but the figures don't seem right.
1 ACCEPTED SOLUTION
v-jianpeng-msft
Community Support
Community Support

Hi, @Alpesh 

Based on your description, I've created the entire sample data below:

vjianpengmsft_0-1724205872756.png

I'm going to simulate your measure using the whole of the following: [Af. Bonn-Art-Rasteyer]

AvePhone AHT-Last Year = SUM('Table'[Ave. Phone AHT - Last Year])

Target Phone AHT:

Target Phone AHT = 
VAR TenPc = [AvePhone AHT-Last Year]*0.1
Return  [AvePhone AHT-Last Year]-TenPc

Actual measure:

EachMonth = SUM('Table'[Ave. Phone AHT - Last Year])

To keep the Target Phone AHT metric flat over the course of a year, I created a metric using the following DAX expression:

Measure = CALCULATE([Target Phone AHT],ALL('Table'[Month]))

This ignores the month context and leaves other filters such as country and year intended. Here are the results:

vjianpengmsft_1-1724206202495.png

vjianpengmsft_2-1724206213388.png

I have provided the PBIX file used this time below for your reference.

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

1 REPLY 1
v-jianpeng-msft
Community Support
Community Support

Hi, @Alpesh 

Based on your description, I've created the entire sample data below:

vjianpengmsft_0-1724205872756.png

I'm going to simulate your measure using the whole of the following: [Af. Bonn-Art-Rasteyer]

AvePhone AHT-Last Year = SUM('Table'[Ave. Phone AHT - Last Year])

Target Phone AHT:

Target Phone AHT = 
VAR TenPc = [AvePhone AHT-Last Year]*0.1
Return  [AvePhone AHT-Last Year]-TenPc

Actual measure:

EachMonth = SUM('Table'[Ave. Phone AHT - Last Year])

To keep the Target Phone AHT metric flat over the course of a year, I created a metric using the following DAX expression:

Measure = CALCULATE([Target Phone AHT],ALL('Table'[Month]))

This ignores the month context and leaves other filters such as country and year intended. Here are the results:

vjianpengmsft_1-1724206202495.png

vjianpengmsft_2-1724206213388.png

I have provided the PBIX file used this time below for your reference.

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Helpful resources

Announcements
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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