Note to Self: Some useful DAX commands which I keep forgetting

5 Jun
Over time, I will add to this list. I want to keep an online copy of DAX commands so I can copy and paste them for future Power Pivots.

When you have an integer and want to convert it into HH:MM or HH:MM:SS format
=FORMAT(TIME(0,0,’CiscoData’[queuetime]),”hh:mm:ss”)

When you want to create a key from a standard date. This will take care of adding in a prefixing zero if the month is January (1) to September (9)
=YEAR(Issues[Logged Date])& FORMAT(MONTH(Issues[Logged Date]),”00″) & FORMAT(DAY(Issues[Logged Date]),”00″)

Creating an index in PowerPivot
=CALCULATE(COUNT(Issues[Logged Date]), ALL(‘WorksheetName’), FILTER(‘WorksheetName‘, Issues[Logged Date]<=EARLIER(Issues[Logged Date])))

This list will grow over time. I just got fed up with forgetting these DAX commands!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: