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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
KateEC
Frequent Visitor

Rolling cumulative totals

Hi,

 

I am trying to create a chart showing a rolling headcount by month (and also eventually creating it for every week, but not running before I can walk, here!).

 

I absolutely cannot figure out how to do this - In regular excel I had thought I'd use COUNTIF to specify date ranges (probably a messy workaround, but hey!), but COUNTIF doesn't seem to be a valid formual in PowerBI and all the workarounds I've seen mentioned look fairly complex. So, any super-simply worded solutions very welcome! (Although perhaps that doesn't exist for what I'm trying to do...?!) I've got start date and end date and headcount data.

 

Thanks in advance! 🙂 

6 REPLIES 6
v-xjiin-msft
Solution Sage
Solution Sage

Hi @KateEC,

 

Please share us your table stucture and some sample data which we can copy and paste directly and its corresponding expected result if possible. It'll help us a lot to provide a more accurate solution.

 

Thanks,
Xi Jin.

Floriankx
Solution Sage
Solution Sage

Generally there is a possibility how to write countif.

 

CALCULATE(Countrows(Table);Filter....

 

I know this is little helpful if you are not that familiar with PowerBI but it's a start.

 

In your case you should first create a date table with contigous dates you can link with your date column.

Fab - thanks for replying so quickly! I'll have a little research into doing what you suggested!

 

I only have 1 table at the moment, so do i still need the "Table" reference in the formula? 

Hello,

 

Countrows requires a table as argument. Only the table name without column.

You may also use Count instead, but I don't use it often.

Thank you 🙂

 

What would be the rest of the formula that you mentioned before? Not used it before Smiley Frustrated 

KateEC
Frequent Visitor

I should have mentioned that I am a huge novice when it comes to Power BI/ DAX etc! 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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