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.
I have matrix_2 where I want to take the date value from a slicer which filters matrix_1, and shows the values that is offset by -7 days. So if showing values for Monday on matrix_1, I want matrix_2 to show values for the previous Monday.
I am using dateadd(selectedvalue(table[transaction_date]), -7, day) but i am getting error:
a function 'selectedvalue' has been used in a true/false expression that is used as a table filter expression. This is not allowed. Hope someone can help. Thanks.
Solved! Go to Solution.
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
Hi,
Ensure that you have a Calendar Table and the slicer has the Date column from this Calendar table. This measure should work
=min(calendar[date])-7
Hope this helps.
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
Wow didn't know you can do that without the selectedvalue function. It worked, unfortunately it didn't help me with what I wanted to do. But thanks, it will help me down the road.
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
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 |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |