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.
Hello,
Very new to Power BI. I have looked at several similar posts on this topic and I think I am very close, but still having an issue.
I have 2 tabes.
'Dates' with field Date.
'Sales' with fields ID, InvoiceDateTime, Profit, Mode (multiple records per InvoiceDateTime)
I have created two Measures:
Solved! Go to Solution.
Hi @AV155,
I'd like to suggest you take a look at the following blog about use date functions do time intelligence and measure total level calculations if they suitable for your scenario:
Time Intelligence "The Hard Way" (TITHW)
Measure Totals, The Final Word
Regards,
Xiaoxin Sheng
Thank you @amitchandak . I had to resolve an issue with the relationship but I am now using my Date table in that measure as you suggested.
The issue I have now is the measure for last year is including all the dates for this month for some reason?
You see the total on the right does not match the sum of the values above it, but rather it is including the values of the complete month of January 2020. This table has the filter of relative date - this year. The true total of the right column should be ~116K.
Hi @AV155,
I'd like to suggest you take a look at the following blog about use date functions do time intelligence and measure total level calculations if they suitable for your scenario:
Time Intelligence "The Hard Way" (TITHW)
Measure Totals, The Final Word
Regards,
Xiaoxin Sheng
@AV155 , First of all use date table in such case
ProfitLastYearPeriod = CALCULATE([TotalProfit], SAMEPERIODLASTYEAR(Date[Date]))
or you can try
Year behind Profit = CALCULATE([TotalProfit],,dateadd('Date'[Date],-1,Year))
Prefer not to use .date, create a date column and join with Date of date table
Date = [InvoiceDateTime].date
or
Date = date(year([InvoiceDateTime]),month([InvoiceDateTime]),day([InvoiceDateTime]))
refer my video why TI fails https://www.youtube.com/watch?v=OBf0rjpp5Hw
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 |
---|---|
105 | |
105 | |
88 | |
73 | |
66 |
User | Count |
---|---|
124 | |
113 | |
98 | |
81 | |
72 |