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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Running Totals Based Upon Teams In Data

Hi, I'm trying to get running totals based upon teams, so, what I mean is, how many calls a team has got where the value is a count. This needs to be a count of ID based upon a team, then the process repeated for another column for the field Fix Time Fix.

 

I've tried something like this but I can't get it work, any ideas?

 

Running Total =
CALCULATE(
Count('MyWorkList Case'[Id]),
FILTER(
'MyWorkList Case',
'MyWorkList Case'[ICT Teams]=EARLIER('MyWorkList Case'[ICT Teams])
&& 'MyWorkList Case'[Id] <= EARLIER('MyWorkList Case'[Id])
)
)
 
Once this is done, I mean, calculation of count per team for ID's and the First Time Fix, I then need to work out the percentage of the value First Time Fix (FTF) per team, divided by the value of ID per team * 100.
 
None of the values are currently measures, if I do a matrix, then all it gives me is the percentage across all calls together across all teams. Hope this makes sense? It needs to be based upon (totals calls / total FTF) * 100 per team.
12 REPLIES 12
Anonymous
Not applicable

Hi @Anonymous ,

 

It seems like you want to calculate the count number based on group, right?

You could use the following formula:

Measure =
CALCULATE (
    DIVIDE (
        COUNT ( 'MyWorkList Case'[Id] ),
        COUNT ( 'MyWorkList Case'[First Time Fix] )
    ),
    FILTER (
        'MyWorkList Case',
        'MyWorkList Case'[ICT Teams] = MAX ( 'MyWorkList Case'[ICT Teams] )
    )
)
Column =
CALCULATE (
    DIVIDE (
        COUNT ( 'MyWorkList Case'[Id] ),
        COUNT ( 'MyWorkList Case'[First Time Fix] )
    ),
    ALLEXCEPT ( 'MyWorkList Case', 'MyWorkList Case'[ICT Teams] )
)
Column 2 =
CALCULATE (
    DIVIDE (
        COUNT ( 'MyWorkList Case'[Id] ),
        COUNT ( 'MyWorkList Case'[First Time Fix] )
    ),
    FILTER (
        'MyWorkList Case',
        'MyWorkList Case'[ICT Teams] = EARLIER ( 'MyWorkList Case'[ICT Teams] )
    )
)

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @Anonymous, thanks for this, but the figure I require is count of First Time Fix / Count of ID to get my percentage for all the teams. These figures need to be displayed per row per team as in the screenshot above.

amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

In case you need a measure try like

 

Running Total =
CALCULATE(
Count('MyWorkList Case'[Id]),
FILTER(
allselected('MyWorkList Case'),
'MyWorkList Case'[ICT Teams]=MAX('MyWorkList Case'[ICT Teams])
&& 'MyWorkList Case'[Id] <= MAX('MyWorkList Case'[Id])
)
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks, this is what the data looks like, I need running totals instead of the default ones so that I can get the percentage right.

 

arafi_1-1608738947526.png

As you can see from the image, when trying to get a percentage across the rows, this is what I get. If I try by columns, then it gives the following.

 

arafi_2-1608739017078.png

It needs to be from 'MyWorkList Case'[First Time Fix] / 'MyWorkList Case'[ID] * 100. ID needs to be total calculated by team as well as First Time Fix. Hope it makes sense?

 

@Anonymous If I am understanding you, you are looking for percent completed first time, not running total. 

 

You cannot do this with the show values as. You will need to create a new measure: 

 

Percent First Time = DIVIDE( COUNT( 'MyWorkList Case'[First Time Fix]) , COUNT( 'MyWorkList Case'[ID] ) )

 

Format it as a percent (You don't need to multiply by 100). 

 

Then add this to the matrix visual in your screenshot. 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

Hi @kallie, thanks for this, but when I add it as an additional column, I get ann error with my visual.

@Anonymous , if you need % of running total try like

 

Running Total % = Divide(CALCULATE(Count('MyWorkList Case'[Id]),allselected('MyWorkList Case')) ,
CALCULATE(
Count('MyWorkList Case'[Id]),
FILTER(
allselected('MyWorkList Case'),
'MyWorkList Case'[ICT Teams]=MAX('MyWorkList Case'[ICT Teams])
&& 'MyWorkList Case'[Id] <= MAX('MyWorkList Case'[Id])))
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Sorry, is this per team - First Time Fix / ID * 100?

Its cause its not giving me that, or am I doing something wrong?

 

arafi_0-1608741184746.png

 

@Anonymous ,

Divide(Count(Table[First Time Fix]), Count(Table[ID])) *100

 

// *100 Is not needed you can mark it as % from measure tools

 

if this did not work then

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Here's link to test copy of Power BI file without sensitive data.

 

Power BI File 

Anonymous
Not applicable

Hi @Anonymous ,

Sorry for that I have trouble getting your pbix file.

Please provide me with more details about your table and your problem. 

 

Best Regards,Eyelyn Qin

Anonymous
Not applicable

Hello @amitchandak, sorry, only started to use this forumn just before the Christmas break, can you tell me how I can upload some samle data for you (and others) to help me out with this?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.