Forum Discussion
Retrieve last day's data
- 4 years ago
Hi, David-INTEX
You can try the following methods.
Measure:
PreTurnover = Var PrevDate=MAXX(FILTER(ALL('Date'[Date]),'Date'[Date]<SELECTEDVALUE('Date'[Date])),'Date'[Date]) Var PreTurnover=CALCULATE(SUM('Date'[Value]),FILTER(ALL('Date'),[Date]=PrevDate)) Return PreTurnoverToday = CALCULATE([PreTurnover],FILTER(ALL('Date'),[Date]=TODAY()))Is this the output you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi:
You can try these measures. Please first add Date Table(named Dates) and mark as Date Table and form relationship to your data table on DateCreation). I will paste Date Table code below.
MODELING>NEW TABLE> see below
Add two new measures after Date Table is connected properly.
Total Amt = SUM(Table[Nombre..Dossier])
It will be great if you add a Date Table and form relationship with your data table. MODELING>NEW TABLE
then this DAX code:
Dates = ADDCOLUMNS ( CALENDAR (FIRSTDATE(Sheet1[ Date]), TODAY()), "year", YEAR ( [Date] ), "MonthNumber", FORMAT ( [Date], "MM" ), "year-month", FORMAT ( [Date], "YYYY-MM" ), "month-year", FORMAT ( [Date], "MM-'YY" ) )
I hope this works for you.
I have tried the solution but I can't get what I want. Is there any other solution?
- Whitewater1004 years ago
Solution Sage
Hi:
You can add calc columns. You can sub in your table name and date into the below. This should work for you. Good luck!
Index = RANKX(MyTable, MyTable[Date], , ASC, Dense)
Prev Value = CALCULATE ( SUM ( MyTable[Value] ), FILTER ( ALLEXCEPT ( MyTable, MyTable[Attribute] ), MyTable[Index] = MAX ( MyTable[Index] ) - 1 ))