Forum Discussion

king76's avatar
king76
Frequent Visitor
4 years ago
Solved

Filter several values, how?

Hello,   I'm using a piece of code I found on the Internet that works very well, which allows me to display the number of records added cumulatively on a graph:    Instead of displaying the...
  • ValtteriN's avatar
    4 years ago

    Hi,

    Could you specify a bit more what do you mean by " I want to display a curve for each activity area"?
    Do you mean you want to have a running total calculation for each activity? If that is what you are trying to do you can add the "activity" field either to legend or small multiples part of your line graph. Also for running totals without YTD I recommend using the following structure: 

    RT with selected time period =
     
    var _edate = MAX('Calendar example'[Date]) return
    CALCULATE(SUM('Quarter calculations'[Value]),
    'Calendar example'[Date]<=_edate,ALL('Calendar example'))
    //You can replace sum with count if that is what you need