datediff

dida

New Member
Joined
Jun 27, 2011
Messages
15
[FONT=&quot] I Have one table of calendar in the query simply dates. another table of projects and start date of the projects.[/FONT]
[FONT=&quot]I wish to choose the project and then get in the calendar table another columns that compare the chosen project start date to the date in the calendar/ I could not find any way to do it. date diff doesn't not work with chosen from slicer[/FONT]
PROJdate
A13/01/2016
B19/01/2016
C04/01/2016

<tbody>
</tbody>
[FONT=&quot] [/FONT]
datedate diff from project
01/01/2016
02/01/2016
03/01/2016
04/01/2016
05/01/2016
06/01/2016
07/01/2016
08/01/2016
09/01/2016
10/01/2016
11/01/2016
12/01/2016

<tbody>
</tbody>
 
edit queries
on the left you'll see two tables, on the right Applied Steps
choose first table and see steps
edit Added Custom (little gear, and you'll see what I did)
check each step so you will see the whole way how it was done.

for datediff
select column date (as first) and date.1 (as second) then use from the ribbon: Add column - Date - Subtract Days

slicer is just a filter , nothing more :) so add slicer and select column with PROJ (A, B, C)

I cannot say too much about MDX because I don't use PowerBI often (I can say: very rare ;) )
 
Last edited:
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I did it all. but once I add project to the source database and tried to refresh I could not:( is that the way it works in power query?
secondly it looks that date diff looks good in the query but in the table its not...
I wish I could add attachment
I used to do all in MDX
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,664
Members
449,114
Latest member
aides

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top