Calculate the number of days between 2 dates in power pivot

Problem: Calculate the number of days between 2 dates in power pivot

Solution: There is no datediff function in DAX, so take 1 date from the other then multiply the result by 1

eg (Date1 – Date2) * 1

Problem: If Date2 is blank then we dont want to display anthing

Solution:

=if(isblank(b3),blank(),b3-b2)*1

Advertisements

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


%d bloggers like this: