Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |