Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
holydragon
Frequent Visitor

Cumulative Area Plot based on cumulative weekly occurrences of dates

Hi, 

I find this is very simple to do in Excel but I've been having a problem getting it to work in power BI.

 

I have a column showing the date of occurrence of an event.

EventResult
1/1/20201
3/4/20203

3/5/2020

4

2/2/20202

 

What I would like to show is a cumulative area plot.  Each event occurence only counts as a single point for the cumulative sum.

I would like the cumulative sum to be based on the week and not the day.  In the end, we should see an area plot as follows..

 

WeekCount
11
21
32
42
53
63
7

4

 

Note: the above table does not reflect what is expected from the example data provided.  It merely shows that if I have a week with no events the cumulative total would reflect the value from the previous week.

 

Any help that you can provide would be greatly appreciated.

 

HD

2 REPLIES 2
Greg_Deckler
Super User
Super User

@holydragon - Please @ me or mark this as an answer if this solved your problem.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

@holydragon - Probably something like the following:

Column =
  VAR __Table = 
    SUMMARIZE(
      ADDCOLUMNS(
        FILTER('Table',[Event] < EARLIER([Event]),
        "Week",
        WEEKNUM([Event])
      ),
      [Week]
    )
RETURN
  COUNTROWS(__Table)
    
      


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.