Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SamFletch
Helper I
Helper I

Comparing a Singular Date to a Date Range

Hello all,

 

I've got a problem that seems fairly simple but I'm struggling to fix myself. 

 

I have 2 tables, one containing actual data and one containing forecasts.

 

The actual data operates on a singular date basis (i.e. every day has its own set of data) and the Forecast operates on a monthly basis (i.e. Feb-2021, Mar-2021, which pulls through into the report as 01/02/21 and 01/03/21 respectively). 

 

In order to tie these together, I've got a date dimension in my report that (in theory) links it all togther, where I've created a "Month Year" ID column to match them up. Every date in February 2021 has the ID 022021, every date in March 2021 has the ID 032021 and so on.

 

The aim is to compare how many vehicles we have on our fleet to the Forecast. 

 

I've put some screenshots below with descrptions to show you how it all looks:

 

Main Sheet:

SamFletch_3-1612866859263.png

 

 

Forecast Sheet:

SamFletch_1-1612866736892.png

 

Date Dimension:

SamFletch_2-1612866768362.png

 

Relationships:

SamFletch_7-1612867039741.png

 

Report:

SamFletch_4-1612866911350.png

 

Report 2:

SamFletch_6-1612866956323.png

 

As you can see, when using the date from the date dimension, the vehicles on fleet pull through on the actual date but the forecast only pulls through on the first of each month. How do I have it so that the Forecast vehicles see the date and return the value from the "Month Year ID" I've created and linked to the dimension?

 

Hope this all makes sense.


Thank you for the help.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@SamFletch , refer to this file attached after signature where I have made target available at the day level

 

Also refer: https://www.youtube.com/watch?v=yPQ9UV37LOU

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@SamFletch , refer to this file attached after signature where I have made target available at the day level

 

Also refer: https://www.youtube.com/watch?v=yPQ9UV37LOU

 

Yeah, that works really nicely, thank you. The "Closingbalance" function is pretty handy, I can already think of a few more uses fo it. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.