Forum Discussion

NinoHoussam's avatar
NinoHoussam
Frequent Visitor
2 years ago

Total measurement Display

Good morning,


I have a problem displaying my grouped chart.


I have a measurement (cumulative) that I am displaying and I only want to display it up to today's date and once moved to the other month it is automatically added to the display and not as l 'image that displays all months of 2024.

 

 

2 Replies

  • NinoHoussam's avatar
    NinoHoussam
    Frequent Visitor

    Measurement I use is :

    TotalCumule =
    CALCULATE(
        COUNTA('BD_SAV'[DateValExpe]),
        FILTER(
            CALCULATETABLE(
                SUMMARIZE(
                    'BD_SAV',
                    'BD_SAV'[DateValExpe].[NoMois],
                    'BD_SAV'[DateValExpe].[Mois]
                ),
                ALLSELECTED('BD_SAV')
            ),
            ISONORAFTER(
                'BD_SAV'[DateValExpe].[NoMois], MAX('BD_SAV'[DateValExpe].[NoMois]), DESC,
                'BD_SAV'[DateValExpe].[Mois], MAX('BD_SAV'[DateValExpe].[Mois]), DESC
        )
    )
    )
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi NinoHoussam ,

     

    Hope all is going well.

     

    Below is what I modified based on the measure you provided. Shows data only as of the current date.

    TotalCumule =
    CALCULATE(
        COUNTA('BD_SAV'[DateValExpe]),
        FILTER(
            CALCULATETABLE(
                SUMMARIZE(
                    'BD_SAV',
                    'BD_SAV'[DateValExpe].[NoMois],
                    'BD_SAV'[DateValExpe].[Mois]
                ),
                ALLSELECTED('BD_SAV')
            ),
            'BD_SAV'[DateValExpe] <= TODAY()
        )
    )

     

    After modification, it should now only count dates on or before today. So it will not include future dates in your cumulative total.

     

    Please test this adjusted metric in your test environment to see if it resolves the issue you are experiencing.

     

    If you still have questions or need further assistance, please feel free to ask.

     

    If it is convenient, I would be very grateful if you could provide the Power BI Desktop file after erasing your personal information.

     

    Thank you for your patience and cooperation.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!