Forum Discussion

newgirl's avatar
newgirl
Post Patron
3 years ago
Solved

Advanced filtering

Hello   I have a sample data model with my current project like below. Data tables are: Activity table - records activities made by salespersons Creation table - records when a client was create...
  • BrianConnelly's avatar
    BrianConnelly
    3 years ago

    Need to update the code as such using variables...

    Volume_related = 
    VAR startDate = MIN('Calendar'[Date])
    VAR endDate = MAX('Calendar'[Date])
    RETURN CALCULATE([Volume],USERELATIONSHIP('Calendar'[Date],'CR tbl_phrawsales'[HisSapZ0123_GEOLOC.CreatedOn])
    ,InvoiceDate >= startDate && InvoiceDate <= endDate
    )