Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Saud19999
Frequent Visitor

Last date with a value

Hey there,,

here is my table below,,

Saud19999_0-1685295220283.png

I want to compare my last available value in the table with the previous one,

 

Thanks,,

 

 

7 REPLIES 7
Saud19999
Frequent Visitor

sorry didn't work ,,, here is a sample data 

sample data.pbix

Ashish_Mathur
Super User
Super User

Hi,

Show the exact result that you are expecting.  Also, share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I didn't get any results so far,, 

I need a bar that displays the last and the previous values with a different percentage.

Day Month Sum of Value
1 May 6,927,633
2 May 6,730,973
3 May 6,921,894
4 May 6,882,067
5 May 6,830,516
6 May 6,864,411
7 May 6,921,897
8 May 6,888,335
9 May 6,808,630
10 May 6,729,808
11 May 6,851,490
12 May 6,665,045
13 May 6,734,506
14 May 6,790,604
15 May 6,985,259
16 May 7,019,464
17 May 6,978,842
18 May 7,115,563
19 May 7,060,486
20 May 7,109,409
21 May (Blank)
22 May (Blank)
23 May (Blank)
24 May (Blank)
25 May (Blank)
26 May (Blank)
27 May (Blank)
28 May (Blank)
29 May (Blank)
30 May (Blank)
31 May (Blank)

Hi,

To your visual, drag Month and Year from the Calendar Table.  Write these measures

Total = sum(Data[sales])

Total on previous day = calculate([total],previousday(calendar[date]))

Growth over previous day (%) = divide(([Total]-[Total on previous day]),[Total on previous day])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I still do not know the result that you want.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

thank you for your cooperation,

I want a graph that compares the last value with the previous one, given a date table.

then I want to find the difference by percentage.

 

 

Greg_Deckler
Community Champion
Community Champion

@Saud19999 See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column = 
  VAR __Current = [Value]
  VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])

  VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
  __Current - __Previous



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors