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.
Hi all,
I have one fact table with the following data:
Each month a forecast is created for the upcoming 12 months. The forecast versions are named 301 (created in January), 302 (Created in February) and so on ..
That means that for each month, there are 12 versions that predicted it (some from last year and some in that year). Furthermore the actual sales value of the predicted month is stored in a version called"#". See table below as an example
Forecast Version [Version_Key] in Dax | [Forecast_Creation_Year] | Predicted Month_Year [Month_Year] in Dax | Forecast [Forecast_Finance] | Sales of predicted month [Sales] in Dax |
301 | 2021 | Mar-21 | 1.1M | |
302 | 2021 | Mar-21 | 0.9M | |
303 | 2021 | Mar-21 | 1.11M | |
304 | 2020 | Mar-21 | 1.1M | |
305 | 2020 | Mar-21 | 0.9M | |
306 | 2020 | Mar-21 | 1.11M | |
307 | 2020 | Mar-21 | 1.1M | |
308 | 2020 | Mar-21 | 0.9M | |
309 | 2020 | Mar-21 | 1.11M | |
310 | 2020 | Mar-21 | 1.1M | |
311 | 2020 | Mar-21 | 0.9M | |
312 | 2020 | Mar-21 | 1.11M | |
# | Mar-21 | 1M |
Target: User can set the forecast creation year (single value) and the range of dates (the predicted months - must be in same calendar year meaning months in 2021 only or 2022 only) he would like to see.
I've built a DAX measure for a matrix to show:
Forecast - If a forecast was created within that year (In yellow)
Sales - Otherwise (In Green)
Variables:
You need to add a Date Table to your model in order to use Time Intelligence.
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Hi @aj1973 ,
Say I have a date Table, what would be the relation between the tables? I thought about this idea but did not see how it may help me. I have lots of other measures in my dashboard that might be affected by this, that's why I'm looking for a specific solution to my last problem 🙂
what you call a "Fact" table doesn't look like it is! It is more like a manually made table and it is missing the primary key that would be more like a Date/Time column.
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
That's true, it's not an exact fact table, however it's the data we have available
The [Month_Year] column is the date column
Therefore it is not going to work as you want.
Why don't work directly with the source, do you need help with that?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.