{"id":534,"date":"2013-07-12T12:14:59","date_gmt":"2013-07-12T19:14:59","guid":{"rendered":"http:\/\/www.sqldbpros.com\/?p=534"},"modified":"2014-03-03T13:40:56","modified_gmt":"2014-03-03T20:40:56","slug":"dax-formulas-to-know-and-love","status":"publish","type":"post","link":"http:\/\/sqldbpros.com\/wordpress\/2013\/07\/dax-formulas-to-know-and-love\/","title":{"rendered":"DAX Formulas To Know And Love"},"content":{"rendered":"<p>PowerPivot this. PowerPivot that. Blah, blah, blah. Sorry folks, I don't have time to learn your new Excel plugin because I'm writing SQL! I'm hardcore!<\/p>\n<p>Well, I finally started using PowerPivot a few days ago and I'm pretty impressed (although I seem to be able to make Excel crash pretty frequently).<\/p>\n<p>So I'm starting a little list of DAX functions which are coming in handy.<\/p>\n<p>Enjoy.<\/p>\n<h2>DAX formulas to know and love<\/h2>\n<p>Find the last day of the week *and* remove the time from a datetime column. Useful when you want to group your datapoints by week.<\/p>\n<p>Converts: 7\/11\/2013 9:51:43 AM (a Thursday) to 7\/13\/2013 (a Saturday).<\/p>\n<pre>=DATEVALUE([YourDatetimeColumnName]+7-WEEKDAY([YourDatetimeColumnName]))<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>PowerPivot this. PowerPivot that. Blah, blah, blah. Sorry folks, I don't have time to learn your new Excel plugin because I'm writing SQL! I'm hardcore! Well, I finally started using PowerPivot a few days ago and I'm pretty impressed (although I seem to be able to make Excel crash pretty frequently). So I'm starting a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,26,108,24,107,122],"tags":[20,25,177,170,109,5],"class_list":["post-534","post","type-post","status-publish","format-standard","hentry","category-businss-intelligence","category-charts-and-graphs","category-dax","category-excel","category-powerpivot","category-ssdt-sql-server-data-tools","tag-business-intelligence","tag-chart","tag-dax","tag-excel","tag-formula","tag-tips"],"_links":{"self":[{"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/posts\/534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/comments?post=534"}],"version-history":[{"count":3,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/posts\/534\/revisions"}],"predecessor-version":[{"id":537,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/posts\/534\/revisions\/537"}],"wp:attachment":[{"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/media?parent=534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/categories?post=534"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/sqldbpros.com\/wordpress\/wp-json\/wp\/v2\/tags?post=534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}