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
Anonymous
Not applicable

Measure for acumulated values in a pay date

Hi,

 

I have a sales table that shows the day that a client will pay for a product that he/she has bought. I want to build a graphic using a measure that shows the total amount that I will receive in the next month, the next two month, and so on.

 

The challenge is that it's necessary to show acumulated values, for instance, If I will receveive $100 in may and another 100$ in june, the value showed in june must be $200 ($100 from may + $100 from june).

 

How can I do a measure for that?

2 REPLIES 2
PaulOlding
Solution Sage
Solution Sage

Working with this fake data:

PaulOlding_0-1620638749886.png

the model looks like this:

PaulOlding_1-1620638799134.png

You could have a new measure called Future Due Amount

Future Due Amount =
VAR _Tomorrow = TODAY() + 1
VAR _CurrentPeriod = MAX('Payment Date'[Date])
VAR _Result =
CALCULATE(
      SUM(Sales[Amount]),
      DATESBETWEEN('Payment Date'[Date], _Tomorrow, _CurrentPeriod)
)
RETURN
_Result
 
Report looks like this:
PaulOlding_2-1620638981100.png

 

amitchandak
Super User
Super User

@Anonymous , You need for duration or overall ?

with help from date table.

 

example

last 2 months

Rolling 2 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],max('Date'[Date]),-2,MONTH))

 

Selected range

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))

 

All

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all(date),date[date] <=max(date[Date])))

 

YTD

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

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.

Top Solution Authors