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 StartedBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
The file “exercise_data.xlsx” contains two sheets of data:
“sales” which contains the sales for a single product sold by an e-shop:
payment_type = the payment type of the order
order_datetime = the date and time the order was placed
sold_quantity = the number of units sold in that order
total_amount = the total amount paid for those units
“returns” which contains the number of items that have been returned from a specific order:
return_datetime = the date and time the order was placed
returned_quantity = the number of units which have been returned.
To complete the 3 exercises, please recreate the attached graphs in POWER BI desktop and apply your best approach in DATABASE STRUCTURE, CODE STRUCTURE and BASIC PAGES GRAPHIC DESIGN. Please don’t apply changes to the file used as input.
Exercise 1:
The owner of the shop wants to visualize a month to month comparison of the latest and last month, meaning June and July 2022, total amount from the sales sheet. However, given the very strong weekly seasonality of the business, syncing the 1st day of both months, 2nd day of both months, etc. would not give a true sense of the variation so instead, the owner would like to overlap the first Monday of the current month to the first Monday of the last month, etc…
Solved! Go to Solution.
Hi @loginarun ,
Below is my test data.
Create a measure showing sales on the same day of the previous week.
Sales previous week =
CALCULATE(
SUM(sales[total_amount]),
'sales'[order_datetime]=MAX('sales'[order_datetime])-7,
ALLEXCEPT('sales',sales[order_datetime])
)
Then create a measure showing the percentage change in sales.
Percentage change per week =
DIVIDE(SUM(sales[total_amount])-[Sales previous week],[Sales previous week])
Place the measures and table fields into the table visual as shown below.
Please see the pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the Support
Thanks
Hi @loginarun ,
Below is my test data.
Create a measure showing sales on the same day of the previous week.
Sales previous week =
CALCULATE(
SUM(sales[total_amount]),
'sales'[order_datetime]=MAX('sales'[order_datetime])-7,
ALLEXCEPT('sales',sales[order_datetime])
)
Then create a measure showing the percentage change in sales.
Percentage change per week =
DIVIDE(SUM(sales[total_amount])-[Sales previous week],[Sales previous week])
Place the measures and table fields into the table visual as shown below.
Please see the pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Need same day of previous Month Example if 4-Apr-2022 is monday the previous month of first monday like 3-Mar-2022 it will show
below the line chart
User | Count |
---|---|
119 | |
78 | |
58 | |
52 | |
46 |
User | Count |
---|---|
170 | |
117 | |
63 | |
58 | |
51 |