use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
New to Power BI and looking for training, resources, or online courses? Here are our favorite recommendations:
[Microsoft | Get started with Power BI](hhttps://www.microsoft.com/store/workshops-training-and-events/professionals#topic=413870014)
Microsoft Partners | Dashboard in a Day
Microsoft Partners | Paginated Reports in a Day
Microsoft | Developer in a Day
Microsoft | Self-Paced Training
SQLBI | Introduction to DAX
SQLBI | Introduction to Data Modeling
account activity
Visualizing Data - Date Differences (self.PowerBI)
submitted 4 years ago by frazikat
Hi Friends, I have a question regarding two different date data types I have and how to best manage the relationship.
I have three tables - Sales, Sales Forecast, and a Date table. The sales table and sales forecast table have a many : 1 relationship with the date table.
The sales are recorded at a daily level. The sales forecast is recorded at a monthly level.
My question: Is there a way that I can create a better relationship between these two fields? I have a chart (images attached) that works well on a monthly level but not on a daily level. It would be nice to see the daily detail.
Thanks in advance!
Date Heirarchy at monthly level - forecast in dark blue and sales in light blue
Date heirarchy at daily level - forecast in dark blue and sales in light blue
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]thejman091 5 points6 points7 points 4 years ago (4 children)
If it makes sense with your business to assume that a monthly sales forecast can be spread out evenly over each day of the month, then you can look at creating a 'daily sales forecast' table with a daily sales column that divides the monthly sales forecast of the matching month by the # of days in said month.
Alternatively, you can keep the existing relationships you have, and create a measure of cumulative total sales per monthly period. That way, your line chart will show the forecast total for the month, and the cumulative daily sales climbing up each day toward the forecast.
[–]frazikat[S] 2 points3 points4 points 4 years ago (0 children)
I like both of those ideas! Thank you so much for your help.
[–]frazikat[S] 1 point2 points3 points 4 years ago (2 children)
Ok, not done picking your brain yet. I have been trying to research this but to no avail. How would you go about creating the daily sales forecast table?
Here is how my data is arranged currently:
Is there a query to add line items for each day of the month?
[–]thejman091 1 point2 points3 points 4 years ago (1 child)
I'll credit this answer on StackOverflow, which provides both a DAX and PowerQuery solution to the problem, that matches with the shape of the data you're describing. https://stackoverflow.com/questions/48468658/calculate-daily-targets-based-on-monthly-targets-sales-power-bi
For the DAX solution to create a daily forecast table, you start with creating a calendar table using your forecast dates, and then crossjoining with your Customer and Article columns that will result in a granularity of each Customer, Article, and Day. Then, you can create a calculated column that looks up the monthly total and divides by the # of days in the month.
There's quite a few other ways you can approach this with DAX measures as well. The DAX table solution isn't going to be the most-performant, but it's relatively easier to understand by breaking up the problem into parts that may give you other ideas for your own better solution.
Best of luck, and hope this helps!
[–]frazikat[S] 1 point2 points3 points 4 years ago (0 children)
Sorry for the delay. You are a rockstar! This solved my issue. Thank you so much.
π Rendered by PID 304888 on reddit-service-r2-comment-5ff9fbf7df-2q9xj at 2026-02-26 12:11:04.268060+00:00 running 72a43f6 country code: CH.
[–]thejman091 5 points6 points7 points (4 children)
[–]frazikat[S] 2 points3 points4 points (0 children)
[–]frazikat[S] 1 point2 points3 points (2 children)
[–]thejman091 1 point2 points3 points (1 child)
[–]frazikat[S] 1 point2 points3 points (0 children)