Forum Discussion
Help with migrating a calculation from Tableau to PowerBI
Hello there! Its kinda hard to understand the use of this measure but you can check if this does what you want:
Date Finished =
VAR _lastdate =
CALCULATE (
LASTDATE ( 'Wastage Data'[Posting Date] ),
ALLEXCEPT (
'Wastage Data',
'Wastage Data'[Prod_ Order No_],
'Wastage Data'[Prod_ Order Line No_]
)
)
RETURN
IF (
SELECTEDVALUE ( 'Wastage Data'[No_] ) in { "FINPRINT", "SMARTCARD VAULT", "FINCARD VAULT"},
_lastdate,
0
)
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
Thank You all for your attempts. I just made the calculation more complicated then I had to.
The answer is below for anyone who runs into a similar problem:
- Anonymous4 years agoNot applicable
Hi Anonymous,
Perhaps you can try using the following measure formula if helps:
Measure = CALCULATE ( MAX ( 'Wastage Data'[Posting Date] ), FILTER ( ALLSELECTED ( 'Wastage Data' ), 'Wastage Data'[No_] IN { "FINPRINT", "SMARTCARD VAULT", "FINCARD VAULT" } ), VALUES ( 'Wastage Data'[Prod_ Order No_] ), VALUES ( 'Wastage Data'[Prod_ Order Line No_] ) )If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng