Forum Discussion
jdballard30
7 years agoHelper II
Create a measure with a filter
I have the following data; it's a table that is denormalized and is the result of the join of App and Transaction. AppID TransactionID DaysBetweenEvents DEF 123 3 DE...
- 7 years ago
Hi jdballard30,
You also can use a measure instead. There could be two approaches.
Measure = AVERAGEX ( DISTINCT ( SELECTCOLUMNS ( ProgramTransactions, "Col1", [AppId], "Col2", [DaysBetweenEvents] ) ), [Col2] )Measure 2 = AVERAGEX ( SUMMARIZE ( 'ProgramTransactions', 'ProgramTransactions'[AppId], 'ProgramTransactions'[DaysBetweenEvents] ), [DaysBetweenEvents] )Best Regards,
Dale
HotChilli
7 years agoCommunity Champion
I think you need to get the distinct appid, daysbetweenevents rows of your table . Something like
NewTable = DISTINCT(SELECTCOLUMNS(YourTable, "ID", YourTable[AppId], "Days",YourTable[AverageDays]))
and then create a measure that takes the average of the Days column
NewMeasure = AVERAGE(NewTable[Days])
and stick that measure on a card
jdballard30
7 years agoHelper II
I'm a bit confused, and it's me, not you. :smileyhappy:
Would the new table be created using the query editor or DAX?