Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Comparing current month to first month in year

Hello,   Looking for some expert help.   I have data from every month of the year, each month has a 'total estate' number. I would like to (using the KPI card) show the current selected months to...
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    Please check the below picture and the attached pbix file.

     

     

     

    Selected monthyear value: = 
    SUM( Data[Value] )

     

     

    Selected year's january value: =
    VAR _selectedyear =
        YEAR ( MAX ( 'Calendar'[Date] ) )
    RETURN
        CALCULATE (
            [Selected monthyear value:],
            FILTER (
                ALL ( 'Calendar' ),
                'Calendar'[Year] = _selectedyear
                    && MONTH ( 'Calendar'[Date] ) = 1
            )
        )