Forum Discussion

eryka_90's avatar
eryka_90
Icon for Helper I rankHelper I
1 year ago
Solved

Total Cumulative - Date Hierarchy

Hi,   I'm having an issue when to visualize Total cumulative in Metrix table or chart. The total cumulative showing right value when I'm not using date hierarchy (Document Date) but when it's chang...
  • Ashish_Mathur's avatar
    1 year ago

    Hi,

    Try this approach

    1. Create a Calendar Table with calculated column formulas for Year, Month name and Month number.  Sort the Month name column by the Month number
    2. Create a relationship (Many to One and Single) from the Date column of the Fact Table to the Date column of the calendar Table
    3. To your visual, drag Date from the Calendar Table
    4. Write this measure

    Measure = calculate([#total amount],datesbetween(calendar[date],minx(all(calendar),calendar[date]),max(calendar[date])))

    Hope this helps.