Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
It is urgent please help
I have data till 1st Aug 2023 in an Excel sheet. The remaining sheet is blank below the 1st AUg.
Slicer Selection:-
31st July 2023 to 1st August 2023
Date SUM Last Year
----- ------ --------
31/7/2022 8
1/08/2022 9
...
31/7/2023 7 8
1/8/2023 3 9
Required output Current_year 10 and last_year 17
But the output of last year is not 17 (more than this) because It is sum of the whole August not only the selected dates.
The remaining dates it is working well only the last date of the data is showing this error.
DAX Query Last_year = CALCULATE([Measure_sum],SAMEPERIODLASTYEAR([date]))
Also Used CALCULATE([Measure_sum],dateadd([date], -1, year))
Both have the same output.
Solved! Go to Solution.
Hi @mickey64 one of best practice to create Date table is on link
https://dax.guide/calendarauto/
Limiting dates as in your Step 1 could result in wrong calculation of previous years data.
Proud to be a Super User!
Hi @aysultaniya please check link below:
https://www.daxpatterns.com/standard-time-related-calculations/
Focus on part Controlling the visualization in future dates as I understand this could be your part of issue.
After that find your scenario (measure). It could be "Sales PY" from picture below as you want fair comparision with previous year
Did I answer your question? Mark my post as a solution! Kudos Appreciated!
Proud to be a Super User!
I think it may be a bug of Power BI.
Step 1: I made a calendar table. [Till 2023/8/2 or Later]
Step 2: I made a relationship.
Step 3: I made some visuals.
Hi @mickey64 one of best practice to create Date table is on link
https://dax.guide/calendarauto/
Limiting dates as in your Step 1 could result in wrong calculation of previous years data.
Proud to be a Super User!
Thank you for your suggestion but I am not able to solve the problem with this . Please provide another solution for that.
Hi @aysultaniya please check link below:
https://www.daxpatterns.com/standard-time-related-calculations/
Focus on part Controlling the visualization in future dates as I understand this could be your part of issue.
After that find your scenario (measure). It could be "Sales PY" from picture below as you want fair comparision with previous year
Did I answer your question? Mark my post as a solution! Kudos Appreciated!
Proud to be a Super User!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
86 | |
83 | |
65 | |
49 |
User | Count |
---|---|
127 | |
108 | |
89 | |
70 | |
66 |