Forum Discussion

Ramiroz's avatar
Ramiroz
Frequent Visitor
6 years ago
Solved

Visual interactions selected date overruling actual and forecast

I'm having a challenge to find a way to present the Orders to-date on different visuals (bar and Gauge measure).   The solution I'm looking for is to reflect in the Guage visual based on the follow...
  • MFelix's avatar
    6 years ago

    Hi Ramiroz ,

     

    Try the following code:

    Actual-To-date =
    IF (
        ISFILTERED ( Query1[Date] );
        CALCULATE (
            SUM ( Query1[Orders] );
            FILTER (
                ALL ( Query1[Date]; Query1[Actual/Forecast] );
                Query1[Date] <= MAX ( Query1[Date] )
            )
        );
        CALCULATE ( SUM ( Query1[Orders] ); Query1[Actual/Forecast] = "ACTUAL" )
    )
    

     

    Check PBIX file attach.