Forum Discussion

JothiG's avatar
JothiG
Helper III
11 months ago
Solved

Help help - Dax correction

Hi,   I have requirement area chart as like shown in above. area area should show the value of last month value break up in series label . for example (2025 should show the August month value ...
  • v-saisrao-msft's avatar
    11 months ago

    Hi JothiG,

    Thank you FarhanJeelani, for your insights.

    I reproduced your issue with sample data and was able to create the issue in Power BI. I made the chart and verified the results. I've attached the PBIX file for your reference.

    Last Month Value = 
    VAR _yr = MAX('yarn data'[Stock_finyear])
    VAR _max_month =
        CALCULATE (
            MAX ( 'yarn data'[month_sorter] ),
            FILTER ( ALL ( 'yarn data' ), 'yarn data'[Stock_finyear] = _yr )
        )
    RETURN
    CALCULATE (
        SUM ( 'yarn data'[Value] ),
        'yarn data'[Stock_finyear] = _yr,
        'yarn data'[month_sorter] = _max_month
    )

     

    Thank you.