Forum Discussion
bignadad
Helper I
2 years agoMeasures with no start date
I am working with leger entries and normally I can user the following to filter out the dates I want. ..02/01/2024 This would show me all records with the end date less than Feb 1 2024 Bu...
- 2 years ago
bignadad Best not to use the [Date].[Date] notation. Instead:
Better RT =VAR __Date = MAX(MasterDate[Dates])VAR __Table = FILTER(ALLSELECTED(MasterDate),MasterDate[Dates] <= __Date)RETURNSUMX(__Table,[Invoiced Value])
bignadad
Helper I
2 years agoThat seems like what I need but I'm getting the same value each month now
I tried this code
Better RT =
VAR __Date = MAX(MasterDate[Dates].[Date])
VAR __Table = FILTER(ALLSELECTED(MasterDate),MasterDate[Dates].[Date] <= __Date)
RETURN
SUMX(__Table,[Invoiced Value])
My invoiced value measure is this
Invoiced Value = CALCULATE(SUM(itemLedgerEntry[costAmountActual]),valueEntry[locationCode]="KS")
This is my relationship between value entry and masterdate
and the relationship between item ledger entry and value entry
Greg_Deckler
Community Champion
2 years agobignadad Best not to use the [Date].[Date] notation. Instead:
Better RT =
VAR __Date = MAX(MasterDate[Dates])
VAR __Table = FILTER(ALLSELECTED(MasterDate),MasterDate[Dates] <= __Date)
RETURN
SUMX(__Table,[Invoiced Value])
- bignadad2 years ago
Helper I
Awesome. Thank you!