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
Hi,
I have this following table:
Period | Start | End | Revenue | Revenue_1_week_ago | Min_Date_1_week_ago | Max_Date_1_week_ago |
A | 1/17/2021 14:00 | 1/24/2021 14:00 | $1,000 | 1/10/2021 14:00 | 1/17/2021 14:00 | |
B | 2/11/2021 14:00 | 2/17/2021 4:59 | $2,000 | 2/4/2021 14:00 | 2/10/2021 4:00 |
My formula for Min_Date_1_week_ago is :
Note that my transaction_date column is in datetime format
Hi @RogerSteinberg ,
I put your data into it and found these two problems
1. The data used in Sum cannot be of String type, you can check whether the type in [Revenue] is Text, if it is to be modified
2. Adjust your date types to be consistent, otherwise there will be no data
After I changed the date types to be consistent, the data is:
The result is:
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
THe max and min dates columns should not be columns but variables within measures. Since my report is really big, I would rather not have additional data points.
@RogerSteinberg Are you doing these as calculated columns or measures? You need to consider the context the DAX calculates within. I can't tell what you're doing because your sample table has no Transaction_date column. Please share sample data set.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
uhm really clueless how this report relates to my question.
my transaction_date column is in my model. its in a timestamp format. every sales figure are recorded on an hourly basis...
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 | |
90 | |
84 | |
70 | |
49 |
User | Count |
---|---|
143 | |
121 | |
112 | |
59 | |
58 |