Forum Discussion

Mitchblue006's avatar
Mitchblue006
Icon for Advocate I rankAdvocate I
3 years ago
Solved

Visualization not working with Date Range Slicer

Hi Everyone   I am building a dashboard with visuals that will ... 1) Allow the user to have a rev counter visual that shows previous and current month measure 2) User can manipulate date Slicer ...
  • amitchandak's avatar
    3 years ago

    Mitchblue006 , Try measures like

     

    This Month =
    var _max = eomonth(if(isfiltered('Date'),MAX( 'Date'[Date]) , today()),0)
    var _min = eomonth(_max,-1)+1 ,
    return
    CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))

     

     

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