Forum Discussion
nssidhu74
6 years agoFrequent Visitor
Create a Table with Column including MAX Date and group by country
How do a translate the following Query. I want to create new table like the one in the following Query. (NOTE: Updated the Query from the Incorrectone) Select Distinct(SourceCountry), ( Sele...
- 6 years ago
Hi nssidhu74 ,
look at this.
https://docs.microsoft.com/en-us/dax/summarize-function-dax
If I answer you question, please mark my post as solution, this will also help others.
Please give Kudos for support.
- 6 years ago
Hi nssidhu74 ,
As what you have requested, you need to create a new table as below:
NEW table = SUMMARIZE('FactSales','FactSales'[SourceCountry],'FactSales'[Data_Date],"Data_Date DESC",MAX('FactSales'[Data_Date]),"VOLUME",SUM('FactSales'[VOLUME]))Then in the new table, turn to the column you wanna sort by and click on the drop-down button, choosing “sort descending” ,finally you will see as below:
For the related .pbix file, you can turn to the URL: https://microsoftapc-my.sharepoint.com/:u:/g/personal/v-kellya_microsoft_com/EWwtQnkFjdhIvflUHyW-zk8BYarDYrCW7FhFsF0LbZGs8g?e=v3W53h
Hope this would help.
Best Regards,
Kelly