Forum Discussion

tclaus's avatar
tclaus
Frequent Visitor
4 years ago
Solved

Multiple Selection on Dynamic Financial Quarter by Customer

Hello,   My coworker and I are trying to create a quarterly report that has the ability to slice by customer and reflect their financial year. For example one customers financial year starts in Jul...
  • v-yanjiang-msft's avatar
    v-yanjiang-msft
    4 years ago

    Hi tclaus ,

    Modify amitchandak 's formula like this:

    Last Qtr =
    var _max1 = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
    var _max = eomonth(_max1,-1* if( mod(Month(_max1),3) =0,3,Month(_max1)))
    var _min = eomonth(_max,-3)+1
    return
    CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))

     

    or

     

    Last Qtr =
    var _max1 = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
    var _max = eomonth(_max1,-1* if( mod(Month(_max1),3) =0,3,Month(_max1)))
    var _min = eomonth(_max,-3)+1
    return
    CALCULATE([net] ,Filter('Date','Date'[Date]>= _min && 'Date'[Date] <= _max))
    //Or use all
    CALCULATE([net] ,Filter(all('Date'[Date]),'Date'[Date]>= _min && 'Date'[Date] <= _max))

     

    Best Regards,
    Community Support Team _ kalyj