Switch date relationship from completed to creation date


#1

Hi,

I am working with the following type of data and I would like to get a more easy way to setup the date relationships.

So I have simplified list of jobs.

  • Jobnumber, creation date, completion date
  • I have a datetable

Now I want to easily make one dashboard and let the user find out following metrics:

  • Jobs completed this month
  • Jobs created this month.

Only way I could do this was creating the job list twice and create a date relationship using first the creation date and for the second one the completion date.

Now I have to build two pages in the dashboard to see the numbers for completion and creation date.
Would there be a way to be able to use a slicer somehow where you can say:

“Hey dashboard, keep all the same measures, just use the other date relationship”

So that way, I could enable/disable a date relationship automagically. It would also help that I then only need one table for my jobs.

I know I can use measures where I can set which date relationship I should follow but I was hoping I could do it more in a standard way so I can easily use the standard features of power bi where you can just drag and drop.

Only way I could think of is that they somehow the would let you enable /disable a date relationship using a slicer or checkbox.

Thanks a lot.


#2

Hi @kvbe,

I would recommend you to go through this course:

It uses a function call USERELATIONSHIP to change between an order date and shipdate in the model, very similar that what you are trying to achieve in your model.

Let me know if this helps you or you need further assistance.

Best regards,

Jorge Galindo


#3

Thanks Jorge, this will for sure help. I was just wondering if you could do it using a slicer or dropdown to change the date relationship.

But I think I will have to go the longer route for this then.

Thanks a lot.