Forum Discussion

PatrickLamoste's avatar
7 years ago
Solved

Make the Card visual display current values

Hello,

 

I hope you can help me.

 

I have a measure for the Total Head Count for terminated  - 

Terminated = IF ( COUNT ( AllTerminated[Last Date Worked] ) = BLANK (), 0, COUNT ( AllTerminated[Last Date Worked] ) )

 

I'm trying to make the Card display only the current count for the year not the total but would also need to change when selecting  a year or years in the slicer.

 

Thank you!

  • parry2k's avatar
    parry2k
    7 years ago

    PatrickLamoste you second measure need change or you can club both in one, double check the syntax/table names, might be typo

     

    Terminated Selected Year = 
    VAR selectedYear = SELECTEDVALUE( AllTerminated[Termination Year], YEAR(TODAY()))
    
    RETURN
    CALCULATE(
    COUNT(Allterminated[Last Date Worked]),
    AllTerminated[Termination Year] = selectedYear
    )

     

5 Replies

  • PatrickLamoste are you looking to have year slicer on the page, and if no value selected then use current year otherwise use year from slicer?

     

    If that is the case you can add a measure to get year selected, if not selected then default to current year 

     

    selectedYear = SELECTEDVALUE( Table[year], YEAR(TODAY() )

    once you have year, you can update your count measure and filter data on "selectedyear" measure.