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
jdballard30
7 years agoHelper II
So I figured it out.
I used the "New Table" option on the Modeling menu to add the table. So that obviously creates a table, and I see how the distinct columns works. In my linked .pbix, I got the result I wanted.
I guess my question is: I could do this in my queries when everything is loaded. Is there a reason to do it in the front-end as opposed to the back-end or vice versa?
HotChilli
7 years agoCommunity Champion
It's entirely up to you. You can do the same algorithm in power query editor or advanced query editor using M.
If you have better skills in DAX, then use that.