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

Time lapse for actual vs target

Hi guys. How can I do a timelapse for sales vs target? Here's the sample table and desired output. Thanks.

 

 

Table 1

ClientDateInvoice_amount
Sam01/10/20191000.00
Bob01/14/20192000.00
John01/20/20195000.00
Paul01/25/201915000.00

 

Table2

MonthTarget_sales
January31000.00

 

 

Desired output is a guage showing total sales of 23,000 & target of 25,000 (as of January 25) instead of 23,000 & target of 31,000. Then the next day (January 26) it will show a target of 26,000, thanks.

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

If the target is $1,000 per day then you could create a "goal" measure perhaps that was simply:

 

Measure = 

VAR __max = MAX([Date])

VAR __day = DAY(__max)

RETURN

__day * 1000


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

If the target is $1,000 per day then you could create a "goal" measure perhaps that was simply:

 

Measure = 

VAR __max = MAX([Date])

VAR __day = DAY(__max)

RETURN

__day * 1000


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

Where does the target of $25,000 come from? Is that a percentage of the total for January or ?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.