Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi everyone,
I have problem with creating a Virtual table with Previous date transaction column. Has everyone can help me?
The formula to get the Previous date column is below:
But the result is still blank.
Solved! Go to Solution.
Hi @ngocrin1
Actually I did not get the idea of using 'Date'[Date] to obtain the previous date. If you want to get pervious calendar date then simply use
Virtual Table =
ADDCOLUMNS (
SUMMARIZE ( Sales, Sales[Purchase Date], Sales[Sales Person ID] ),
"@Revenue", [Sales Revenue],
"@PreDate", Sales[Purchase Date] - 1
)
If you're looking for the previous sales date of the product in row then please try
Virtual Table =
ADDCOLUMNS (
SUMMARIZE ( Sales, Sales[Purchase Date], Sales[Sales Person ID] ),
"@Revenue", [Sales Revenue],
"@PreDate",
VAR CurrentDate = Sales[Purchase Date]
VAR PreDate =
MAXX (
CALCULATETABLE (
VALUES ( Sales[Purchase Date] ),
Sales[Purchase Date] < CurrentDate
),
Sales[Purchase Date]
)
RETURN
PreDate
)
Hi @ngocrin1
Actually I did not get the idea of using 'Date'[Date] to obtain the previous date. If you want to get pervious calendar date then simply use
Virtual Table =
ADDCOLUMNS (
SUMMARIZE ( Sales, Sales[Purchase Date], Sales[Sales Person ID] ),
"@Revenue", [Sales Revenue],
"@PreDate", Sales[Purchase Date] - 1
)
If you're looking for the previous sales date of the product in row then please try
Virtual Table =
ADDCOLUMNS (
SUMMARIZE ( Sales, Sales[Purchase Date], Sales[Sales Person ID] ),
"@Revenue", [Sales Revenue],
"@PreDate",
VAR CurrentDate = Sales[Purchase Date]
VAR PreDate =
MAXX (
CALCULATETABLE (
VALUES ( Sales[Purchase Date] ),
Sales[Purchase Date] < CurrentDate
),
Sales[Purchase Date]
)
RETURN
PreDate
)
Tks Tamerj1,
It worked well. I'm looking for previous date sales transactions.
Hi @ngocrin1 please try to change your date column in Power Query from type date time to type date, and see results. I hope this help
Proud to be a Super User!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
11 | |
9 | |
8 | |
8 |