Forum Discussion
Anonymous
8 years agoNot applicable
DAX
I need the following in DAX format. Requirement: I have a table called Transactions which has 3 columns ID, [Billing Type] and [Year-Month] as mentioned below. I need to create a measure that sho...
- 8 years ago
Anonymous
Please change the MEASURE to following
But i Have following observtions
1) 10 th occurence of ID 2 is in June
2) November 2017 date doesn't exist in your data
Measure = VAR mycount = CALCULATE ( COUNT ( TableName[ID] ), FILTER ( ALL ( TableName ), TableName[Year-Month] <= SELECTEDVALUE ( TableName[Year-Month] ) && TableName[RANK] = 10 ) ) RETURN IF ( ISBLANK ( mycount ), 0, mycount )
Zubair_Muhammad
Community Champion
8 years agoHi Anonymous
Try this technique
1) First Add an Index Column from the Query Editor
2) Then Add a RANK Calculated Colum
RANK =
RANKX (
FILTER ( TableName, TableName[ID] = EARLIER ( TableName[ID] ) ),
TableName[Index],
,
ASC,
DENSE
)3) Now you can use this MEASURE
Measure = CALCULATE ( COUNT ( TableName[ID] ), TableName[RANK] = 10 )
Zubair_Muhammad
Community Champion
8 years ago