Forum Discussion

caslus's avatar
caslus
Icon for Helper I rankHelper I
6 years ago
Solved

Max date and value by date filter slicer (dinamic)

The archive : https://transfernow.net/215t88x2cpeh This is my table... and my filter:   If I put the filter 13/8/2019 to 5/09/2019... I want show just the yellow part and make a sum of thos...
  • amitchandak's avatar
    amitchandak
    6 years ago

    caslus 

    I got a new measure, It seems to give correct GT and correct values when view NUM_DPL. But when view by NUM_DOL and date , it does not show correct value, figuring out that

    Total value = Calculate(
        sumx(  
            ADDCOLUMNS( 
                SUMMARIZE(
                    data,
                    data[NUM_DPL],
    				"max_date",
    				MAX( 'Date'[Date]),
                    "Max_ID", max(data[NUM_DPL])
                ),
                "_num",
                calculate(
                    Max(data[VLR_SLD_TOT_CAL]),
                    filter(
                        (data),
                        data[NUM_DPL]= [Max_ID] && data[DAT_REF]= ([max_date]) )
                    )
                )
            ,[_num]
        )
    )