datediff

Anything related to PowerPivot and DAX Formuale
sharon.mathew
Posts: 8
Joined: Mon Feb 12, 2018 4:06 am

datediff

Postby sharon.mathew » Mon Feb 12, 2018 4:09 am

Hi All,

i have been struggling to get this sorted.

first of all thank you.

ok, i have a pivot table as shown below.

row label date

product 1 1/15/17

product 2 1/16/17

product 4 1/18/17

what i try to get through DAX is an expression which can bring the results in a third column with the difference between two dates.

row label date Result

product 1 1/15/17

product 2 1/16/17 1

product 4 1/18/17 2

kindly help me build it and thanks in adv

benholmes
Posts: 5
Joined: Tue Jan 30, 2018 9:22 pm

Re: datediff

Postby benholmes » Mon Feb 12, 2018 5:58 am

You say you have a pivot table with those rows/values, what does the actual data table look like in PowerPivot (can you give some dummy or sample data)?

And in terms of the calculation, is it literally just going to be the difference between the date in the current row displayed on the pivot and the date on the previous row on the pivot?

sharon.mathew
Posts: 8
Joined: Mon Feb 12, 2018 4:06 am

Re: datediff

Postby sharon.mathew » Mon Feb 12, 2018 1:54 pm

Hi Thank you for helping me.

here is the sample data.

sample dax.xlsx
(100.94 KiB) Downloaded 8 times

sharon.mathew
Posts: 8
Joined: Mon Feb 12, 2018 4:06 am

Return Earlier date within 7 days prior

Postby sharon.mathew » Sat Feb 17, 2018 2:23 am

hi All kindly help me derive a measure which would yield earlier dates but within previous week.

Thanks
Sharon
Dax Earlier.xlsx
(352.24 KiB) Downloaded 1 time


Return to “PowerPivot/DAX”

Who is online

Users browsing this forum: No registered users and 2 guests

cron