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
cthurston
Advocate II
Advocate II

calculate quantities at a moment in time

Hello,
I am attempting to calculate Total Quotes at a moment in time.  I have an ID, close date and quote date columns.  What I wish to do in the 2nd table is to calculate how many opps had previously become quotes before the end of the month and had not closed before that month.  I also have a Close date Year filter on this report set to 2017.  I've tried several different filters on measures, to no success.

 Sample TableSample Table

 

0load.JPG

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @cthurston ,

I'm not quite sure what you want. If I understand you correctly, you can create a measure like so:

Measure =
CALCULATE (
    COUNTROWS ( 'Table' ) + 0,
    FILTER (
        'Table',
        'Table'[QualProspectToQuote Date] <> BLANK ()
            && MONTH ( 'Table'[QualProspectToQuote Date] ) <= MONTH ( MAX ( 'Date'[Date] ) )
            && MONTH ( 'Table'[Close Date Actual] ) > MONTH ( MAX ( 'Date'[Date] ) )
    )
)

opp.PNG

 

Best Regards,

Icey

 

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

3 REPLIES 3
Icey
Community Support
Community Support

Hi @cthurston ,

I'm not quite sure what you want. If I understand you correctly, you can create a measure like so:

Measure =
CALCULATE (
    COUNTROWS ( 'Table' ) + 0,
    FILTER (
        'Table',
        'Table'[QualProspectToQuote Date] <> BLANK ()
            && MONTH ( 'Table'[QualProspectToQuote Date] ) <= MONTH ( MAX ( 'Date'[Date] ) )
            && MONTH ( 'Table'[Close Date Actual] ) > MONTH ( MAX ( 'Date'[Date] ) )
    )
)

opp.PNG

 

Best Regards,

Icey

 

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

Is Date[Date] related to your fact table in this case?  This looks like what I initially tried but maybe in my fustration I missed and operator.

Icey
Community Support
Community Support

Hi @cthurston ,

No relationship between the two tables.

relationship.PNG

 

Best Regards,

Icey

 

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

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.