The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |