Forum Discussion

topazz11's avatar
topazz11
Icon for Helper III rankHelper III
6 years ago
Solved

Slicers change/interactions

Hello,

How can I make the current and prior date filtered by item selection (apple or grape).

I expect to see the slicers (current, prior) to be changed based on the item selection.  

 

here is example pbix file:

PBIX 

 

Thank you! 

4 Replies

  • VijayP's avatar
    VijayP
    Icon for Community Champion rankCommunity Champion

    I could not understand your question. Can you please elaborate? Why You wanted to see the slicers in that why, what should be the outcome

  • topazz11, How does the selection of dimension impact date? Try to use time intelligence along Date calendar for standard current prior

    MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
    last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
    QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
    
    Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))
    YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date]),"12/31"))
    This Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD((ENDOFYEAR('Date'[Date])),"12/31"))
    
    Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
    Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))