Forum Discussion
Previous Date value based on the date selection
- Anonymous4 years ago
Hi Anonymous ,
Use independent date table as slicer and create a measure like below:
Measure = var _previous = EDATE(MAX('Date'[date]),-1) return CALCULATE(SUM(TransactionTable[value]),FILTER(TransactionTable,TransactionTable[Date]=_previous))Or create a measure as below and add it to visual filter set value = 1:
Measure 2 = var _previous = EDATE(MAX('Date'[date]),-1) return IF(SELECTEDVALUE('TransactionTable'[Date])=_previous,1,0)Best Regards,
Jay
Anonymous , Then try
new measure =
var _max = maxx(allselected(Date),Date[Date]) -1
return
calculate( SUM('TransactionTable'[Value), filter('Date', 'Date'[Date] =_max ))
amitchandak Thank you for the reply. I have tried that with maxdate-1. Still it is showing the totals only not the values.
If the date range is from 02-01-2022 to 04-01-2022, my table need to show the data related to 03-01-2022.
| Team | Value |
| X | 2 |
| Y | 5 |
| Z | 1 |
I need the output by the Team name like above but im getting the resuts as below with only totals not the values.
| Team | Value |
| X | |
| Y | |
| Z | |
| Total | 8 |
Can anyone please help me out?
Thanks in advance,
Vishnu Priya
- ryan_mayu4 years ago
Super User
Anonymous
pls see the attachment below