Forum Discussion

matthewtjy's avatar
matthewtjy
Icon for Helper I rankHelper I
5 years ago
Solved

Plotting a cumulative chart based on distinct counts

How do I plot a cumulative distinct count chart in PBI (like a running summation of distinct counts)?   I was able to find lots of information on cumulative summation charts however for my problem,...
  • amitchandak's avatar
    amitchandak
    5 years ago

    matthewtjy , Have year column in your table or use one from the Date hierarchy and try measure like

     

    New column

    Year = year([SUBMIT_DT])

     

    New measure

    Cumm Sales = CALCULATE(distinctcount('Table'[WORKPLACE_NO]),filter(allselected('Table'),'Table'[SUBMIT_DT] <=max('Table'[SUBMIT_DT])))

     

    New measure with Date table, having year column

    Cumm Sales = CALCULATE(distinctcount('Table'[WORKPLACE_NO]),filter(allselected('Date'),'Date'[Date] <=max('Date'[Date])))

     

     

    To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.