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
SRobbo1990
Frequent Visitor

How to show 'Vs Target %' for the month based on Today

Hi all,

 

Currently I have a graph showing how the business is doing for the Month vs the Target for the month and the Year previous. Below this we have a Card showing the high level values. (See below)

 

SRobbo1990_0-1677146913968.png

 

Now the issue I'm having is that the Booking GBS figure is live in the sense that its up to today. The target obviously goes right up until month end. The 'Vs Target %' is taking the Bookings GBS figure and comparing it to the Target GBS figure at month end. What I've been asked to do is show the 'To date' figures and then compare them.

I've been able to create a measure that shows it on a daily basis;

SRobbo1990_1-1677147106067.png

But as soon as I put it on the card it reverts back to the -14.86% figure for the full month. 

Is there anyway I can get it to look at just today's 'Vs Target %' without moving away from using the MTD functions?

 

Thanks

 

1 REPLY 1
MAwwad
Super User
Super User

 

Yes, you can create a measure that calculates the "Vs Target %" for the current day. Here's an example formula that you can use:

 

scssCopy code
Vs Target % (MTD) Today = VAR TodayDate = TODAY() VAR BookingsMTD = [Bookings GBS MTD] VAR TargetMTD = [Target GBS MTD] VAR TargetToDate = TargetMTD / DAY(TodayDate) * DAY(EOMONTH(TodayDate)) RETURN DIVIDE(BookingsMTD, TargetToDate) - 1
 

This formula uses the TODAY() function to get the current date, and then calculates the target figure for the current day based on the number of days in the month so far. The rest of the calculation is similar to the MTD calculation that you already have.

Once you have this measure, you can add it to the card visual alongside the other measures. It should show the "Vs Target %" for the current day rather than for the entire month.

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.