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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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