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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.