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 the sum of the whole of 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],date add([date], -1, year))
Both have the same output.
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
DATE | VALUE |
Sun 31-Jul-22 | 2 |
Mon 01-Aug-22 | 3 |
Tue 02-Aug-22 | 4 |
Wed 03-Aug-22 | 5 |
Thu 04-Aug-22 | 6 |
Fri 05-Aug-22 | 7 |
Sat 06-Aug-22 | 8 |
Sun 07-Aug-22 | 9 |
Mon 08-Aug-22 | 2 |
Tue 09-Aug-22 | 3 |
Wed 10-Aug-22 | 4 |
Thu 11-Aug-22 | 5 |
Fri 12-Aug-22 | 6 |
Sat 13-Aug-22 | 7 |
Sun 14-Aug-22 | 8 |
Mon 15-Aug-22 | 9 |
Tue 16-Aug-22 | 2 |
Wed 17-Aug-22 | 3 |
Thu 18-Aug-22 | 4 |
Fri 19-Aug-22 | 5 |
Sat 20-Aug-22 | 6 |
Sun 21-Aug-22 | 7 |
Mon 22-Aug-22 | 8 |
Tue 23-Aug-22 | 9 |
Wed 24-Aug-22 | 2 |
Thu 25-Aug-22 | 3 |
Fri 26-Aug-22 | 4 |
Sat 27-Aug-22 | 5 |
Sun 28-Aug-22 | 6 |
Mon 29-Aug-22 | 7 |
Tue 30-Aug-22 | 8 |
Wed 31-Aug-22 | 8 |
Mon 31-Jul-23 | 9 |
Tue 01-Aug-23 | 5 |
Date selected in slicer is 31st July 2023 to 1 August 2023 | ||
Expected | Output (31st August 2023 to 1 August 2023) | Output Sameperiod last year function output |
Average | 7 | 2.5 |
Sum | 14 | 5 |
Ourput | ||
Average | 7 | 5.46 |
Sum | 14 | 175 |
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 |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
120 | |
110 | |
59 | |
57 |