Forum Discussion
ahhk2000
Aug 13, 2021Copper Contributor
DAX time comparison function help
Would be grateful for advice on how to calculate the following with a DAX formula & Power Pivot (Excel 2016) I have a sheet with three columns: Date (in DD/MM/YYYY) | Name of Sales Person | Sale ...
ahhk2000
Aug 16, 2021Copper Contributor
Sergei, thank you so much for your help. I shoud have clarified that I meant 6 months from present, so I got it working with Today () instead of using the MAX function for endDate in your example. Very helpful.
I'm wondering for a related scenario - if there are duplicate entries and a 4th field for "Tranasaction ID" (e.g. more than one sales person involved in the same sale). Is there a function for the sum of total amount based on distinct Transaction ID only?
I'm wondering for a related scenario - if there are duplicate entries and a 4th field for "Tranasaction ID" (e.g. more than one sales person involved in the same sale). Is there a function for the sum of total amount based on distinct Transaction ID only?
SergeiBaklan
Aug 16, 2021Diamond Contributor
Above is quite simple mockup to illustrate an approach. You may max of period on TODAY(), when result will be like
Not sure what is Transaction ID in the model, but in general you may aggregate as you need. Useful patterns are here DAX Patterns