Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Greetings, all! I'm attempting to calculate a running total for a disconnected table and am hoping someone can help me out. Here's a sample scenario.
Let's say I have the following tables (model below):
I'm wanting to get a running total/count of the Events table and then "categorize" them dynamically.
Date | Person | EventType |
10/1/2022 | Max Jones | Webinar |
10/1/2022 | John Smith | Webinar |
10/1/2022 | Jane Doe | Webinar |
10/2/2022 | Jane Doe | Webinar |
10/3/2022 | Matthew Hicks | Webinar |
10/3/2022 | Margaret Johnson | Conference |
10/3/2022 | Regina Ortiz | Conference |
11/13/2022 | Max Jones | Webinar |
11/13/2022 | John Smith | Conference |
12/1/2022 | Jane Doe | Webinar |
12/1/2022 | Max Jones | Conference |
12/1/2022 | John Smith | Conference |
12/5/2022 | John Smith | Conference |
The Category table has the following values:
Order | Value |
1 | High |
2 | Medium |
3 | Low |
I need to get a "subtotal" count of the events and then apply a "category" to them using the following logic:
SWITCH(true, {RunningTotalEventCount} >= 4, "High", {RunningTotalEventCount} >= 2, "Medium", "Low")
I then want to show this in a visual like the following:
The issue is ALL of this needs to be done in a measure because it needs to change when a person slices/dices. Been working on this for a few hours and am about near my wit's end.
Hope all of this made sense. Appreciate it!
Hi @arpost ,
I have created a simple smaple, please refer to it to see if it helps you.
Create a column first.
month = MONTH('Table'[Date])
Then create a measure.
Measure = var _1=
CALCULATE(COUNT('Table'[EventType]),FILTER(ALL('Table'),'Table'[EventType]=SELECTEDVALUE('Table'[EventType])&&'Table'[month]=SELECTEDVALUE('Table'[month])))
return
IF( _1>= 4, "High",IF(_1>= 2, "Medium", "Low"))
Or a column.
Column = var _1=
CALCULATE(COUNT('Table'[EventType]),FILTER(ALL('Table'),'Table'[EventType]=EARLIER('Table'[EventType])&&'Table'[month]=EARLIER('Table'[month])))
return
IF( _1>= 4, "High",IF(_1>= 2, "Medium", "Low"))
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
16 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
23 | |
11 | |
10 | |
10 | |
8 |