crazytimechris
New Member
- Joined
- Sep 5, 2015
- Messages
- 10
HI,
I have dome DAX code for a custom column but I need to create the column in power query rather than in DAX. Can anyone help me convert this function over to M please?
Basically I have players coming every month and I want to have a marker on their first appearance so I can compare new and returning players over time.
Thanks a lot in advance!
Chris
I have dome DAX code for a custom column but I need to create the column in power query rather than in DAX. Can anyone help me convert this function over to M please?
Basically I have players coming every month and I want to have a marker on their first appearance so I can compare new and returning players over time.
Code:
New customer =
VAR mycount =
CALCULATE (
COUNTROWS ( DAILY_SUMMARY_BY_PLAYER ),
FILTER (
ALLEXCEPT ( DAILY_SUMMARY_BY_PLAYER, DAILY_SUMMARY_BY_PLAYER[ACCOUNT_ID] ),
DAILY_SUMMARY_BY_PLAYER[DATE] < EARLIER ( DAILY_SUMMARY_BY_PLAYER[DATE] )
)
)
RETURN
IF ( mycount = 0, "Yes" )
Thanks a lot in advance!
Chris