Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I have the following data, Type and Result. I'd like to create a running count of each instance of "Type", starting anew with a new Type, such as in my column "Desired Running Count". I've tried so many different ideas I think I'm missing the forest for the trees.
Can anyone help?
Solved! Go to Solution.
@JGiesy349 , You can create a measure for this
Desired Running Count =
VAR CurrentType = Data[Type]
VAR CurrentRow = EARLIER(Data)
RETURN
COUNTROWS(
FILTER(
Data,
Data[Type] = CurrentType &&
Data[Index] <= CurrentRow[Index]
)
)
Proud to be a Super User! |
|
@JGiesy349 , You can create a measure for this
Desired Running Count =
VAR CurrentType = Data[Type]
VAR CurrentRow = EARLIER(Data)
RETURN
COUNTROWS(
FILTER(
Data,
Data[Type] = CurrentType &&
Data[Index] <= CurrentRow[Index]
)
)
Proud to be a Super User! |
|
Thank you very much @bhanu_gautam !
I modified it slightly to get it to work, but it did.
User | Count |
---|---|
18 | |
18 | |
14 | |
13 | |
13 |
User | Count |
---|---|
17 | |
14 | |
14 | |
10 | |
8 |