The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi All,
I have three tables ("Date Table", "Inventory", and " sales" ). I want the last 30 days' sales of quantity for each item from the "current date"(This column in the "Inventory" table). I have tried but it showing blank.
I have tried the below measures
MY OP:-
And please tell me why this is happening and what's the solution.
Thank you!! @amitchandak @Ashish_Mathur @ValtteriN
Hi,
Your question is not clear. Share data in a format the can be pasted in an MS Excel file and show the expected result.
1, you need to mark Calendar Table as Date Table
2, Create one-to-many relationship from Calendar to Inventory, and to Sales
3, try this measure
Last30Days=VAR _date=Max(Inventory[Current Date]) VAR _item=MAX(Inventory[Item_ID]) RETURN CALCULATE(SUM(Sales[Quantity]),DATESINPERIOD(Calendar[Date],_date,-30,DAY),Sales[ItemID]=_item)
Hi Daniel,
Thanks for Ans but it is not working. and still getting the same error as before.
And for your second point I can not able to make the relationship between the calendar and inventory and when I try to it is creating inactive.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
21 | |
18 | |
16 | |
15 | |
14 |
User | Count |
---|---|
37 | |
33 | |
22 | |
18 | |
18 |