Forum Discussion
Ackbar-Learner
Resolver I
3 years agoUnderstanding EOMONTH in DAX
Hi, I am having a very strange situation with EOMONTH Below is the measure I am using to get last day of previous month of either the selected date or today's date whichever comes first: Board0...
- 3 years ago
Hi,
I am not sure how your datamodel looks like, but please try something like below whether it suits your requirement.
Board02bP&LAllTransactionAmountwithSignActual = VAR _Board01fActualizedDateSelected = [Board01fActualizedDateSelected] VAR Result = SUMX ( GLChartOfAccounts, CALCULATE ( [P&LAllTransactionAmountEUR], FILTER ( ALL ( GLAccountClientUser[GLAccountValue] ), GLAccountClientUser[GLAccountValue] < 4700000 ), FILTER ( BudgetCalendar, BudgetCalendar[Date] <= _Board01fActualizedDateSelected ) ) * GLChartOfAccounts[Sign] ) RETURN Result
Jihwan_Kim
Super User
3 years agoHi,
I am not sure how your datamodel looks like, but please try something like below whether it suits your requirement.
Board02bP&LAllTransactionAmountwithSignActual =
VAR _Board01fActualizedDateSelected = [Board01fActualizedDateSelected]
VAR Result =
SUMX (
GLChartOfAccounts,
CALCULATE (
[P&LAllTransactionAmountEUR],
FILTER (
ALL ( GLAccountClientUser[GLAccountValue] ),
GLAccountClientUser[GLAccountValue] < 4700000
),
FILTER (
BudgetCalendar,
BudgetCalendar[Date] <= _Board01fActualizedDateSelected
)
) * GLChartOfAccounts[Sign]
)
RETURN
Result