Forum Discussion
Snapshot Comparison based on dynamic date selection
- 2 years ago
just an update how i solved this :
i created 2 tables for dates in SQL DB, uploaded them as independent tables and linked to the main table (which contained the meaures) using SELECTEDVALUE.
thanks all for inputs.
can you please help to explain a little more in detail?
thanks,
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- sandy_PBI2 years agoFrequent Visitor
thanks,
The data table looks like below (table 1) where I have forecasted/actual sales captured everyweek for the same week.
I have created a filter for snapshot week single select filter for snapshot column where the user can see the comparison of latest snapshot and compare it with the pervious snapshot. The prev snapshot is another measure that i calculate in SQL using a windows function and upload it Power BI.
The user is looking for a capability for selecting any 2 snapshot and the resultant table (table 2)
please let me know if i need to provide more information.
thanks.
Table 2
snapshot total_forecasted_sales 01/04/2024 00:00 11183 (J3) 04/03/2024 00:00 90000 (J4) Change in sales =+J4-J3 78817 %age_change =+(J4-J3)/J3 7.047929894 Table 1
ITEM_ID snapshot salesweek total_forecasted_sales SKUA 01/04/2024 00:00 01/04/2024 00:00 11183 SKUA 25/03/2024 00:00 01/04/2024 00:00 11183 SKUA 18/03/2024 00:00 01/04/2024 00:00 41200 SKUA 18/03/2024 00:00 01/04/2024 00:00 17349 SKUA 11/03/2024 00:00 01/04/2024 00:00 23543 SKUA 04/03/2024 00:00 01/04/2024 00:00 5886 SKUA 26/02/2024 00:00 01/04/2024 00:00 36110 SKUA 19/02/2024 00:00 01/04/2024 00:00 26486 SKUA 19/02/2024 00:00 01/04/2024 00:00 33504 SKUA 12/02/2024 00:00 01/04/2024 00:00 26486 SKUA 05/02/2024 00:00 01/04/2024 00:00 26486 SKUA 29/01/2024 00:00 01/04/2024 00:00 50029 SKUA 22/01/2024 00:00 01/04/2024 00:00 26486 SKUA 15/01/2024 00:00 01/04/2024 00:00 139050 SKUA 08/01/2024 00:00 01/01/2024 00:00 172010 SKUA 08/01/2024 00:00 01/04/2024 00:00 106283 SKUA 08/01/2024 00:00 01/05/2024 00:00 107598