Forum Discussion

arnomics's avatar
arnomics
Icon for Helper I rankHelper I
2 years ago
Solved

Use previous Row Date & Current Row Date to create range for calculation

Hi all,

 

I've been trying to crack this specific requirement.

 

I currently have a Table Visual with Date from Date Column. I've got the below Measure which concatenates Payment info from Payment Table.

 

The result returned with the existing Measure are good. It returns Concatenated values based on the Month Name.

However, I'm now trying to create/use a Range that will help me create a Date Range based on Dates displayed on the visual.

 

i.e instead of using Month Name, I want to use the Date in Current Row & Date in Previous/Earlier row to create a Date Range to concatenate values that fall within the Date Range.

 

Is this something that can be achieved? Or am I trying something that is not possible. Thanks.

VAR SelectedMonths = VALUES('Date'[Month Name])
RETURN
    CALCULATE (
        CONCATENATEX (
            '06 Payment', 
            '06 Payment'[PayDATE] & " $" & '06 Payment'[PaymentAmt],
            ",|  "
        ),
        'Date'[Month Name] IN SelectedMonths, 
        ALLEXCEPT('Date', 'Date'[Month End Date])
    )

 

2 Replies