Forum Discussion

NewbieJono's avatar
NewbieJono
Icon for Post Partisan rankPost Partisan
2 years ago
Solved

Year To Max Date

is there a method of doing a year to max date in a fact table.   i need the year to start 01/04 and I need to calculate volumes to the max date of another dateset.   i will also need to do a same...
  • Sergii24's avatar
    Sergii24
    2 years ago

    Like this:

    InScope = 
    VAR _MaxFromFactTable = MAX( YOUR_FACT_TABLE[Date] )
    RETURN
        IF(
            'Calendar Table'[Date] <= _MaxFromFactTable,
            1,
            0
        )


    Good luck! 🙂