Forum Discussion
SHOW 10 DAYS BACK TO SELECTEDVALUE
- 6 years ago
Hi Anonymous ,
I created a sample table as below:
First create a slicer table using below dax expression:
Slicer = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))Then create a measure as below:
Measure = IF(SELECTEDVALUE('Slicer'[Date])=BLANK(),SUM('Table'[Sales]),IF(MAX('Table'[Date])>=SELECTEDVALUE('Slicer'[Date])-10&&MAX('Table'[Date])<=SELECTEDVALUE('Slicer'[Date]),SUM('Table'[Sales]),BLANK()))Finally you will see:(If no date is selected)
if one date is selected:
For the related .pbix file,pls click here.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
hi amitchandak thanks for the information, is not the solution for my request, cause i need to show the dates in x axis, and with this mesaure i have an acumulated from data, and went i put this measure in line chart 1. show all dates and 2. if i selected a date just show one date, and i need to see 10 days back to selected.
thanks!
Hi Anonymous ,
I created a sample table as below:
First create a slicer table using below dax expression:
Slicer = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
Then create a measure as below:
Measure = IF(SELECTEDVALUE('Slicer'[Date])=BLANK(),SUM('Table'[Sales]),IF(MAX('Table'[Date])>=SELECTEDVALUE('Slicer'[Date])-10&&MAX('Table'[Date])<=SELECTEDVALUE('Slicer'[Date]),SUM('Table'[Sales]),BLANK()))
Finally you will see:(If no date is selected)
if one date is selected:
For the related .pbix file,pls click here.
Kelly
- Anonymous6 years agoNot applicable
hI v-kelly-msft THANKS SO MUCH FOR THIS! I'm happy for still learning from people like you.
For future checkers is importan to say, is not necessary any relatio between the tables.
THANKS AND REGARDS!!!