DateWrangle
New Member
- Joined
- May 4, 2017
- Messages
- 2
Hi All
I am pretty fluent with Excel but I am still getting to grips with DAX and I am struggling to come up with the correct DAX formula for what should be a simple Measure.
I have a number of connected Tables in PowerPivot. The table I wish to apply a measure to is a table called MailingHistory, which is formatted as follows:
[TABLE="width: 580"]
<tbody>[TR]
[TD]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[TD]
[/TR]
[TR]
[TD]
[TD]
[TD]
[/TR]
</tbody>[/TABLE]
I am able create a measure detailing the Last Mailing Date by using the DAX formula Last Mailing Date:=LASTDATE(MailingHistory[MailingDate]).
What has me scratching my head is how to create a measure that returns the MailingDescription corresponding to the Last Mailing Date.
I suspect that there is an easy way to return this value, but thus far the solution has eluded me despite my best efforts and I'd be very grateful if anyone could advise.
Many thanks!
I am pretty fluent with Excel but I am still getting to grips with DAX and I am struggling to come up with the correct DAX formula for what should be a simple Measure.
I have a number of connected Tables in PowerPivot. The table I wish to apply a measure to is a table called MailingHistory, which is formatted as follows:
[TABLE="width: 580"]
<tbody>[TR]
[TD]
ContactID
[/TD][TD]
MailingDescription
[/TD][TD]
MailingDate
[/TD][/TR]
[TR]
[TD]
123456
[/TD][TD]
Spring Mailing 2017
[/TD][TD]
01/042017
[/TD][/TR]
[TR]
[TD]
456789
[/TD][TD]
Spring Mailing 2017
[/TD][TD]
01/042017
[/TD][/TR]
[TR]
[TD]
789123
[/TD][TD]
Winter Mailing 2016
[/TD][TD]
01/12/2017
[/TD][/TR]
[TR]
[TD]
654130
[/TD][TD]
Winter Mailing 2016
[/TD][TD]
01/12/2017
[/TD][/TR]
[TR]
[TD]
927231
[/TD][TD]
Autumn Mailing 2016
[/TD][TD]
01/09/2016
[/TD][/TR]
[TR]
[TD]
789123
[/TD][TD]
Autumn Mailing 2016
[/TD][TD]
01/09/2016
[/TD][/TR]
</tbody>[/TABLE]
I am able create a measure detailing the Last Mailing Date by using the DAX formula Last Mailing Date:=LASTDATE(MailingHistory[MailingDate]).
What has me scratching my head is how to create a measure that returns the MailingDescription corresponding to the Last Mailing Date.
I suspect that there is an easy way to return this value, but thus far the solution has eluded me despite my best efforts and I'd be very grateful if anyone could advise.
Many thanks!