Forum Discussion

pstanek's avatar
pstanek
Icon for Post Patron rankPost Patron
9 years ago

Page-Level Filter by measure

I would like to filter by NOW()-1, YTD, MTD and others , but I have many parameters, So I don´t want to create

 

CALCULATE( SUM( TABLE[COLUMN1];TABLE[DATE]=NOW()-1)

 

CALCULATE( SUM( TABLE[COLUMN2];TABLE[DATE]=NOW()-1)

 

CALCULATE( SUM( TABLE[COLUMN3];TABLE[DATE]=NOW()-1)

.

.

.

 

I use direct query most of time, so I can´t use time intekigence funtion. How will I do it without create the same measure multipletimes. I want one measure and use u in page level filter for example.

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      An alternate method, should GilbertQ's not be to your liking, is to create a calculated column which does a simple IF statement to check if the row is in the date filtered range or not.  Something like

      inRange = IF(
      	'Table'[Date] < Today(),
      	1,
      	0
      )

      You can set your filter to only show rows where the inRange = 1

       

      • pstanek's avatar
        pstanek
        Icon for Post Patron rankPost Patron

        Can I use use relative slicer from certain date?

         

        For example If I want to filter interval NOW -14 to NOW - 7 , I can´t use relative slicer. I can use relative slicer , if I want to filter NOW -7 to NOW.