Forum Discussion
Drill-down using RELATED function
- Anonymous1 year ago
Hi mbudiman
Please try the following formula.
Prev_Qtr_Revenue = CALCULATE( SUM(Sales[Revenue]), FILTER( ALLEXCEPT(Sales, Sales[Sale Region]), RELATED(Fiscal_Qtr_Table[Qtr_Sequence_No]) = MAX(Fiscal_Qtr_Table[Qtr_Sequence_No]) - 1 ) )In my test, I used the Fiscal_Qtr column of Fiscal_Qtr_Table for the matrix rows, and the Columns and Values were from the Sales table.
Output:
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I forget to mention that the tables are joined using "Fiscal_Qtr" column.
DAX for "Previous Qtr Revenue" measure is :
Hi mbudiman
Please try the following formula.
Prev_Qtr_Revenue =
CALCULATE(
SUM(Sales[Revenue]),
FILTER(
ALLEXCEPT(Sales, Sales[Sale Region]),
RELATED(Fiscal_Qtr_Table[Qtr_Sequence_No]) = MAX(Fiscal_Qtr_Table[Qtr_Sequence_No]) - 1
)
)
In my test, I used the Fiscal_Qtr column of Fiscal_Qtr_Table for the matrix rows, and the Columns and Values were from the Sales table.
Output:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- mbudiman1 year agoHelper III
hi Yulia, the solution provided works. Thank you.