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
judithnig
Regular Visitor

Calculate funcion with date refernce

Hello, 

I am trying to calculate the sum of new Business after a certain inflection date.

The data of the inflection dates is included in the excel as column. The new business is created as a measure.

 

I used following, but I am not sure how to reference to the inflection date, so that I get as a result only the new business after the specific inflection date.

 

Sum New BIZ after inflection date = CALCULATE(
    SUM(CRI[SUM New BIZ],
    DATE = 'Cri Transaction Detail'[Inflection Date]))

 

judithnig_0-1675166740867.png

 

Thank you upfront, 
Judith

 

3 REPLIES 3
Anonymous
Not applicable

Hi @judithnig 

 

Try using the filter function to filter the date. It should look something like this:

 

Measure =
CALCULATE (
    [SUM New Biz],
    FILTER ( ALL ('Cri Transaction Detail'), 'Cri Transaction Detail'[Date] => (  MAX('Cri Transaction Detail'[Date])) )
)

I used the MAX() function to get exactly one argument to filter for. You can also hard code the date, important is that you provide only one filter argument. In your example you refered to the whole colum [Inflection Date] which is why there is no exact date to filter for. 

 

Best Regards,

Dan 

Hi Dan,

 

Thanks for your quick reply.

 

I tried following, but I get an error. Just to clarify: my dates I want to refer to, are saved in the colum CRI Transaction Details (Inflection date), thats why I was referring to that row before. 

 

I am still not sure how to solve this - any other idea? Not sure if below is what you had in mind. The column CRI transaction detail (date) doesnt exist like this.

 

judithnig_0-1675169047290.png

 

Anonymous
Not applicable

can you provide an example dataset or screenshots of the data? It's difficult to give an exact answer without knowing what the data looks like.

 

Best regards

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!

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.