Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I'm having a problem using the measure CALCULATE filtering by a text value, and the LASTDATE.
Can someone help me, please?
This is the expression:
Solved! Go to Solution.
This is likely because DATAMAX isn't "Iniciativas Entregues".
If you want the last date for that specific text filter, then you'll need to modify your measure.
VAR DATAMAX =
CALCULATE (
LASTDATE ( 'F&A'[Data] ),
'F&A'[Informações] = "Iniciativas Entregues"
)
VAR RESULT =
CALCULATE (
SUM ( 'F&A'[Valor] ),
'F&A'[Informações] = "Iniciativas Entregues",
'F&A'[Data] = DATAMAX
)
RETURN
RESULT
You're almost there.
Try this:
VAR DATAMAX = LASTDATE ( 'F&A'[Data] )
VAR RESULT =
CALCULATE (
SUM ( 'F&A'[Valor] ),
'F&A'[Informações] = "Iniciativas Entregues",
'F&A'[Data] = DATAMAX
)
RETURN
RESULT
It's returning a blank value now.
This is likely because DATAMAX isn't "Iniciativas Entregues".
If you want the last date for that specific text filter, then you'll need to modify your measure.
VAR DATAMAX =
CALCULATE (
LASTDATE ( 'F&A'[Data] ),
'F&A'[Informações] = "Iniciativas Entregues"
)
VAR RESULT =
CALCULATE (
SUM ( 'F&A'[Valor] ),
'F&A'[Informações] = "Iniciativas Entregues",
'F&A'[Data] = DATAMAX
)
RETURN
RESULT
Hi,
Share the link from where i can download your PBI file.
User | Count |
---|---|
106 | |
88 | |
81 | |
76 | |
73 |
User | Count |
---|---|
112 | |
104 | |
96 | |
74 | |
66 |