Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I am looking for a way to either create a measure or calculated column to get the last unitname per event_idx. Below is a picture with data attached.
As you can see, there are many updates to a single event, so I would like to know the best way to take the last unitname based on the action date field and group it by event_idx. If this was sql I could do this easily but I am not as familiar with dax so I am struggling with the correct formulas and syntax.
Any help would be appreciated.
Thanks!!
Solved! Go to Solution.
Hi @Anonymous ,
If you want to calculate the last unitname based on the action date field and group it by event_idx.
My Sample:
Measure =
CALCULATE(MAX(TableName[UNITNAME]),FILTER(TableName,TableName[ACTIONDATE] = MAX(TableName[ACTIONDATE])))
Create a table visual by [EVENT_IDX] and [Measure].
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try with
= CALCULATE ( MAX ( TableName[ACTIONS] ), ALLEXCEPT ( TableName, TableName[EVENT_IDX], TableName[ACTIONDATE] ) )
Is that a measure?? Thanks for the response!!
Hi @Anonymous ,
If you want to calculate the last unitname based on the action date field and group it by event_idx.
My Sample:
Measure =
CALCULATE(MAX(TableName[UNITNAME]),FILTER(TableName,TableName[ACTIONDATE] = MAX(TableName[ACTIONDATE])))
Create a table visual by [EVENT_IDX] and [Measure].
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |