Forum Discussion

Companyuser101's avatar
2 years ago
Solved

Showing only relevant data in graph

Hello,

 

I have a rolling 12 month measure like this:

 

Subventionen 12 Mth Rolling =
VAR EndDate =
    MAX( 'Datum (RS, Subventionsanträge)'[Date]) -- retrieves MAX Date  
VAR StartDate =
    Date(Year(Today()), Month(Today())-12, Day(Today()))
VAR Result =
    CALCULATE(
        SUM('Subventionsanträge'[Abgerechnet (Anzahl)]),
        -- retrieves the relevant date range
        DATESBETWEEN(
            'Datum (RS, Subventionsanträge)'[Date],
            StartDate,
            EndDate
        )
    )
RETURN
 If (EndDate > Today() , Blank(),  Result)
 
-------------------------------------
 
I want to show the this graph only until current month, which is october. But it shows until december.  

 

How can I change my measure that it will work?

1 Reply

  • Hi Companyuser101 
    Add to your table column that checks if the date is greater than today and filter the visual by this flag.

    Another method is on the linked video :
    https://www.youtube.com/watch?v=JnhXyQ8eyuo

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly