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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

running total using count?

I'm trying to recreate this risk matrix from excel

whulsbergen_0-1594795648512.png

To do so, I need to offset coordinates based on how many points there are. In excel I use this:

whulsbergen_1-1594795740097.png

 

And then I need to count the coordinates. So for example:

itemxyxycount_xy
item 123231
item 213131
item 344441
item 444442

 

In the report I filter by date, so if possible, I want the count to be a dynamic measyre. How do I do this?

 

I tried running totals, but that doesn't work for items like it does for dates:

 

count_xy = calculate (count(xy);filter (allselected(xy);count(xy)<= count(???)(xy)))

7 REPLIES 7
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

You will need to create an index column for Item

 

Then You can use this measure

 

RT =
VAR CurrentItem =
    SELECTEDVALUE ( 'Table'[Index No] )
RETURN
    CALCULATE (
        COUNT ( 'Table'[XY] ),
        'Table'[Index No] <= CurrentItem,
        ALL ( 'Table'[Index No] )
    )

 

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

 

Anonymous
Not applicable

Sorry @harshnathani , didn't work.

 

RT =
VAR CurrentItem =
SELECTEDVALUE ( RM_risicodata[XY_index])
RETURN
CALCULATE (
COUNT ( RM_risicodata[XY_index]);
RM_risicodata[XY_index] <= CurrentItem;
ALL( RM_risicodata[XY_index])
)
 
Result:
 

Schermafbeelding 2020-07-15 om 14.09.13.png

 

 

 

 

 

 

 

 

 

 

As you can see, the RT just shows "1". And with XY = 33, there should have been a 2 at RiskID 97.

Hi @Anonymous ,

 

Please share some Sample Data in text format .

 

Also can you share the expected output.

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

Anonymous
Not applicable

Risk_IDXYXYXY_indexexpected
98242451
102323281
95333391
97333392
993434101
1005454171
1035454172
965454173

 

Like this @harshnathani ?

The last column is what I expect.

 

FYI:

I need this to offset the coordinates in the next step so they show up seperately in a bubble diagram in stead of stacked.

RISKID 100: x= 5-0,2=4,8. y=4 + 0,2 = 4,2

RISKID 103: x= 5-0,2=4,8. y=4 - 0,2 = 3,8

RISKID 96: x= 5+0,2=5,2. y=4 + 0,2 = 4,2

Hi @Anonymous ,

 

 

You can create a NewColumn

 

Column = RANKX(FILTER('Table','Table'[XY_index] = EARLIER('Table'[XY_index])),'Table'[XY]+'Table'[Risk_ID],,ASC)

 

 

Regards,

Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

Anonymous
Not applicable

Thanks @harshnathani for your help so far. I like your thinking, but I need to give it some more time. From what I can understand you regard the XY_index like it is a date. But that is not the case, it would be more like counting the unique index-numbers against the total number of that index-number in a column.

 

And I need it to be flexible, as I have various dates in the table and want to be able to filter without leaving holes in the bubble matrix.

 

 

Hi @Anonymous ,

 

Can you pls share enough sample data and the expected output.

 

What I could understand from the data which was shared that you needed a running count based on XY_index column.

 

 

Regards,

Harsh Nathani

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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