We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
hello guys,
i have issue with dax measure..
i need a dax measure who calculate all fees from last 15 month but i need him to starts summring from the individual point for each payer which is dax measure as well who have a 1 or 0 value
until now i tried a lot of versuin like that and keep getting this error
A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
Solved! Go to Solution.
Try
test measure =
SUMX (
VALUES ( 'Payer'[Payer ID] ),
VAR LastChangeDate =
CALCULATE (
MAX ( dimDate[Date] ),
FILTER (
ALL ( dimDate[Date] ),
[churn] = 1
&& dimDate[Date] > EDATE ( TODAY (), -15 )
)
)
RETURN
IF (
NOT ISBLANK ( LastChangeDate ),
CALCULATE (
[All Fees],
FILTER (
ALL ( dimDate[Date] ),
dimDate[Date] > EDATE ( LastChangeDate, -15 )
&& dimDate[Date] <= LastChangeDate
)
)
)
)
You need to iterate over the individual payers, so that the calculation is done for each row. Try
test measure =
SUMX (
VALUES ( 'Payer'[Payer ID] ),
VAR LastChangeDate =
CALCULATE (
MAX ( dimDate[Date] ),
[churn] = 1,
dimDate[Date] > EDATE ( TODAY (), -15 )
)
RETURN
IF (
NOT ISBLANK ( LastChangeDate ),
CALCULATE (
[All Fees],
FILTER (
ALL ( dimDate[Date] ),
dimDate[Date] > EDATE ( LastChangeDate, -15 )
&& dimDate[Date] <= LastChangeDate
)
)
)
)
A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
getting this error again
Try
test measure =
SUMX (
VALUES ( 'Payer'[Payer ID] ),
VAR LastChangeDate =
CALCULATE (
MAX ( dimDate[Date] ),
FILTER (
ALL ( dimDate[Date] ),
[churn] = 1
&& dimDate[Date] > EDATE ( TODAY (), -15 )
)
)
RETURN
IF (
NOT ISBLANK ( LastChangeDate ),
CALCULATE (
[All Fees],
FILTER (
ALL ( dimDate[Date] ),
dimDate[Date] > EDATE ( LastChangeDate, -15 )
&& dimDate[Date] <= LastChangeDate
)
)
)
)
User | Count |
---|---|
13 | |
12 | |
8 | |
8 | |
6 |
User | Count |
---|---|
28 | |
20 | |
14 | |
11 | |
5 |