Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everyone,
I have a table similar to the below in which data comes in multiple times in a week. The count for a particular Vertical/Domain/Team combination is taken as the count for the latest date for which data is available
Vertical | Domain | Team | Date | Sales Count |
Vehicle | Car | Tesla | 8/18/2021 | 17 |
Vehicle | Car | Tesla | 8/16/2021 | 15 |
Vehicle | Car | Tesla | 8/10/2021 | 10 |
Vehicle | Car | Ford | 8/17/2021 | 20 |
Vehicle | Car | Ford | 8/16/2021 | 18 |
Vehicle | Car | Toyota | 8/10/2021 | 15 |
Vehicle | Truck | Man | 8/17/2021 | 8 |
Vehicle | Truck | Man | 8/12/2021 | 5 |
Vehicle | Truck | Volvo | 8/18/2021 | 10 |
I need to create a visualization that would calculate the Sales Count for the last 1 week, that would return the following values for the selected combinations:
Vehicle/Car/Tesla = 7
Vehicle/Car/Toyota = 0
Vehicle/Car/* = 27
Vehicle/Car/Tesla+Toyota = 7
Vehicle/Truck/* = 13
Vehicle/Truck/Man = 3
Is there a way to accomplish this in PowerBI?
Thanks. Is your Sales table linked to a standard Date table and, if so, does that Date table contain a column indicating the week number?
Regards
The columns mentioned in the post are present in a standard table in a mySQL database.
Week number column is not there. I have added one separately within PowerBI in order to plot some weekly graphs using the below:
Hi,
Can you just clarify who you get your desired result for Vehicle/Car/*?
Also, how is "last 1 week" more rigorously defined?
Regards
Last 1 week would be the default Sunday through Saturday.
For Vehicle/Car/* it would be a summation of cars of all types sold in the current week starting Sunday
17-10=7 for tesla, 20 for Ford and 0 for Toyota giving a total of 27**
**The post said 12 which was a calculation error from my side. Apologies. I've corrected it
User | Count |
---|---|
21 | |
14 | |
11 | |
8 | |
5 |
User | Count |
---|---|
24 | |
22 | |
20 | |
15 | |
10 |