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,
I have a table with the latest sales for today. Now, i want to go back and fetch the sales for 1 month back, 2 months back likewise upto 6 months back. However, the previous data is available in a different fact table. I have a separte date dimension table which is connected to both the fact table. When i am going one - six months back, since the date has to be customized based on the availability of the sales, i am using the function as follows :
Solved! Go to Solution.
Hi @Anonymous ,
In other words, you want to get the sales data of the previous month, but the sales data of the previous month are in another fact table, so you need to create a date column, right?
Maybe you can use the "Append Queries" feature to merge the two fact tables.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If MONTH( dateincurrenttable ) is 1, then MONTH( dateincurrenttable ) - 1 = 0 and this is not allowed in DATE. Also, months do not have the same number of days, so if you happen to have a month with 31 days and the previous only had 30... then the DATE can't be created. There are many other issues with your approach (but I don't have time to explain them right now) so I'd kindly suggest you should abandon this way of coding. Please look for something more robust: time-intel functions.
Thanks Daxer. Yes, i understand the issues. and i worked out on multiple options but without any solutoin except that i get the result but i need to create different measures and just show the data in the card format. i was trying to show the data as bar graph with dates as axis.
Tahnks
Hi @Anonymous ,
In other words, you want to get the sales data of the previous month, but the sales data of the previous month are in another fact table, so you need to create a date column, right?
Maybe you can use the "Append Queries" feature to merge the two fact tables.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.
User | Count |
---|---|
14 | |
2 | |
2 | |
1 | |
1 |