Forum Discussion
Anonymous
6 years agoNot applicable
SHOW 10 DAYS BACK TO SELECTEDVALUE
hi, i tried with a column with this sintax column = if( table[date] >= max(table[date]) -10 , sales) with this column i can show static data, i need to replace the max(table[date]) to selecte...
- 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!
v-kelly-msft
Community Support
6 years agoHi 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,
Kelly
Kelly
Did I answer your question? Mark my post as a solution!
Anonymous
6 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!!!