Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm trying to do YOY sales information to see comparisons - like most people on here.
First Formula:
Total Sales = Sum('Source Data'[Gross Revenue])
Second Formula :
Total Sales LY = CALCULATE([Total Sales],SAMEPERIODLASTYEAR(Calender[Date].[Date]),ALLEXCEPT(Calender,Calender[Date].[Date]))
For the second formula, it's returning the sum of ALL the total sales, not breaking it out by month. If I get rid of the ALLEXCEPT part, it shows the same information as "Total Sales". How do I fix this?
Solved! Go to Solution.
This issue was stemming from the fact that PowerBI wasn't recognizing the date field as a true date field. I had to create a new column that explicitly created a new date field for it to work. Thanks.
I'm trying to follow these instructions here about three comments down :
Few points you have to consider.
1. The Date table should have a key called DateKey of the format - (YYYYMMDD).
2. Similarly the FactTable should also have a key called FactDateKey of the format - (YYYYMMDD)
3. The two tables should be linked on the DateKey columns
4. The DateTable should be contigous and no gaps.
5. For the same period previous year it is enough to use the expression
PYRSalesSamePeriod:=CALCULATE([Sales], SAMEPERIODLASTYEAR(Calendar[FullDate]))
The Calendar here refers to the Calendar Table and the FullDate is a column in this table of format (DD/MM/YYYY).
Replace it with your names
Try it out and if this solves your problem please accept this as a solution and also give Kudos.
Cheers
CheenuSing
This issue was stemming from the fact that PowerBI wasn't recognizing the date field as a true date field. I had to create a new column that explicitly created a new date field for it to work. Thanks.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |