Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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...
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
119 | |
78 | |
58 | |
52 | |
46 |
User | Count |
---|---|
170 | |
117 | |
63 | |
58 | |
51 |