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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
spitfyah
Frequent Visitor

Break a monthly figure into a daily figure

Hi all,

 

I currently have a target table as this:

 

ClientStart DateEnd DateTarget 1Target 2Target 3
Client 101-Jan-2231-Jan-22223709343
Client 201-Jan-2231-Jan-2267446747
Client 301-Jan-2231-Jan-22264379561
Client 101-Feb-2228-Feb-2211822881
Client 201-Feb-2228-Feb-22607495356
Client 301-Feb-2228-Feb-223336115
Client 101-Mar-2231-Mar-22447859100
Client 201-Mar-2231-Mar-2273656684
Client 301-Mar-2231-Mar-22216619663
Client 101-Apr-2230-Apr-22309666331
Client 201-Apr-2230-Apr-22217555143
Client 301-Apr-2230-Apr-22870280130
Client 101-May-2231-May-22651820610
Client 201-May-2231-May-22899622835
Client 301-May-2231-May-22895651873

 

I wanted to make a matrix that would show something like this

 

 MTD Target CTD TargetRolling 3M Target
Client 142012941213.929
Client 258021401728.107
Client 3577.41935481996.4191770.455

 

 

MTD Target would be for the 1st 20 days of may, target figure/(days in month)*days elapsed in month

CTD Target is everything from February 1st onwards as that's when the contract starts

Rolling 3M Target would be the target for the last 90 days (so from Feb 20 to May 20)

 

I only have the monthly figures so was hoping to get a measure that would split the monthly figure out via the days present in the month. If possible I would also like a generic target figure that would show the target based on the date filters I have applied in the slicers.

 

 

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @spitfyah 

Please have a try.

MTD Target =
VAR _month =
    MONTH ( MAX ( 'Table'[Start Date] ) )
VAR _days =
    DAY ( EOMONTH ( MAX ( 'Table'[Start Date] ), 0 ) )
VAR _sum =
    CALCULATE (
        MAX ( 'Table'[Target 1] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[client] = SELECTEDVALUE ( 'Table'[client] )
                && 'Table'[Start Date] = SELECTEDVALUE ( 'Table'[Start Date] )
        )
    )
VAR _datt =
    DAY ( DATE ( 2022, 5, 20 ) )
RETURN
    _sum / _days * 20

vpollymsft_0-1653372289187.png

 

How to calculate the other columns?

 

Could you please provide more details?  The specific calculation of the formula. Like the MTD Target: sum target1 in May / days in each month * Number of days elapsed during the month

 

Best Regards

Community Support Team _ Polly

 

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

amitchandak
Super User
Super User

@spitfyah , refer if this can help

Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.