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
bjoshi
Resolver I
Resolver I

Obtaining values from the First Date and Last Date of a Table

I have the following table with Date and Cumulative Total. I need two measures - one is the cumulative total at the first day of a month (The first day might not start from 1st  always. The first date has to the the first date of this date set for that month). The second measure is the cumulative total at the last day of a month ( again, the last day has to be the last date of this date set for that month).

 

closing.png

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@bjoshi

 

hi, try with this both measures

 

FirstDate-CTotal =
CALCULATE ( SUM ( Table1[Cumulative Total] ), FIRSTDATE ( Table1[Date] ) )
LastDate-CTotal =
CALCULATE ( SUM ( Table1[Cumulative Total] ), LASTDATE ( Table1[Date] ) )



Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

@bjoshi

 

hi, try with this both measures

 

FirstDate-CTotal =
CALCULATE ( SUM ( Table1[Cumulative Total] ), FIRSTDATE ( Table1[Date] ) )
LastDate-CTotal =
CALCULATE ( SUM ( Table1[Cumulative Total] ), LASTDATE ( Table1[Date] ) )



Lima - Peru

Hi @Vvelarde,

 

I had tried this earlier and hadn't worked. But it worked perfectly this time. Thank You.

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.