Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
There are a ton of posts here about SamePeriodLastyear, but I have not been able to find one that describes my problem:
* Using AutoQuery to SQL
* Created Dates table using CalendarAuto(12)
* Created relation from my transaction table date field to the Dates table
* Measure: TotalSales = SUM(ITK_Retail_AM_ITKRetailTransactionsView[AALINEAMOUNT])
* Measure: TotalSalesLastYear = CALCULATE(ITK_Retail_AM_ITKRetailTransactionsView[TotalSales], SAMEPERIODLASTYEAR(ITK_Dates[Date]))
* If I create a table to show just TotalSales and TotalSalesLastYear, it works. I can filter on (for instance) category, and it shows the proper numbers for that category:
However, when I add the date column to the table, the numbers are not correct for the line, but they are for the totals. On the line level it shows the same amount for both columns.
(Note that the date slicer on top is set to make sure all dates in the table are selected)
What am I missing here ?
Solved! Go to Solution.
@RobvB , you need to add a date column from the date table ITK_Dates. you need to use ITK_Dates[Date]
Use the Date column from your date table intead of the TransDate column from fact table.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Use the Date column from your date table intead of the TransDate column from fact table.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@RobvB , you need to add a date column from the date table ITK_Dates. you need to use ITK_Dates[Date]
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
89 | |
86 | |
75 | |
69 | |
68 |
User | Count |
---|---|
220 | |
128 | |
117 | |
82 | |
77 |