cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Jacy
Frequent Visitor

LastDate minus 1

Good morning, I need to add the value of a measure to the maximum date of the base minus one day. As I developed it does not work, it follows $ Recipe D = CALCULATE ([Recipe]; LASTDATE ('Data Link' - 1).
In addition I need to add the accumulated of the month that is smaller than the maximum date selected.

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hello there. Even I didn't understand the cumulative part, i think this can help.

 

Recipe = CALCULATE(SUM('Table'[NumberRecipe]); DATEADD(LASTDATE('Table'[Date]); -1;DAY)) 

 

Regards,

 

 


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

Happy to help!

LaDataWeb Blog

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @Jacy,

 

>>In addition I need to add the accumulated of the month that is smaller than the maximum date selected.

You can try to use TOTALYTD function to calculate the accumulated value.

 

Referencelink:

TOTALMTD Function (DAX)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
ibarrau
Super User
Super User

Hello there. Even I didn't understand the cumulative part, i think this can help.

 

Recipe = CALCULATE(SUM('Table'[NumberRecipe]); DATEADD(LASTDATE('Table'[Date]); -1;DAY)) 

 

Regards,

 

 


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

Happy to help!

LaDataWeb Blog

Jacy
Frequent Visitor

Hello, this function works but only on a separate object, on a graph that has the company size as an example, it takes the maximum date minus one of each company. Ex - Company x has last move day 09-06-2017 and company y has last on 08-06-2017 when playing the function of maximum date in this chart he picks up 9 in company x and 8 in company y. But the right thing is to take the last date ... day 9. the same logic of maximum date-1.

Jacy
Frequent Visitor

Good morning, I need to add the value of a measure to the maximum date of the base minus one day. As I developed it does not work, it follows $ Recipe D = CALCULATE ([Recipe]; LASTDATE ('Data Link' - 1).
In addition I need to add the accumulated of the month that is smaller than the maximum date selected.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors