Forum Discussion
Dynamic Header Date value in matrix table
- Anonymous4 years ago
Hi Krishnan_47
You can create a measure to realize your need .
(1)Create a calculated table to return the date column from original data table, and add a slicer with the column 'Table 2'[Date]
Table 2 = SELECTCOLUMNS('Table',"Date",'Table'[Date])(2)Create a measure to return current month and previous month data when you select date in slicer .
select month value = CALCULATE(SELECTEDVALUE('Table'[Value]),FILTER('Table','Table'[Date]<=SELECTEDVALUE('Table 2'[Date]) && 'Table'[Date]>=DATEADD('Table 2'[Date],-1,MONTH)))(3)Add the measure to values in Matrix visual .
Final result is as shown :
I have attached my pbix file , you can refer to it.
Best Regard
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Krishnan_47
You can create a measure to realize your need .
(1)Create a calculated table to return the date column from original data table, and add a slicer with the column 'Table 2'[Date]
Table 2 = SELECTCOLUMNS('Table',"Date",'Table'[Date])
(2)Create a measure to return current month and previous month data when you select date in slicer .
select month value = CALCULATE(SELECTEDVALUE('Table'[Value]),FILTER('Table','Table'[Date]<=SELECTEDVALUE('Table 2'[Date]) && 'Table'[Date]>=DATEADD('Table 2'[Date],-1,MONTH)))
(3)Add the measure to values in Matrix visual .
Final result is as shown :
I have attached my pbix file , you can refer to it.
Best Regard
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Krishnan_474 years ago
Helper I
Thank you Ailsa-msft. I have one more additional clarifcation. Please let me know if it is possible to achieve the following scenarios:
1. Can we add a new column 'Diff' for each Asset? The formula for diff will be (Current Month - Prev Month).
2. Can we show Total in column level.
Please find below screenshot highlighted in yellow for the two points: