Forum Discussion
Need help with Grouping Data
- 7 years ago
Hi Anonymous
try this approach.
See the attached file as wellFirst create a calculated table
NewTable = SELECTCOLUMNS ( GENERATESERIES ( 1, MAX ( Purchases[Count of Purchases] ) ), "Count of Purchases", [Value] )Then a Measure
No. of users = COUNTROWS ( FILTER ( VALUES ( Purchases[UserId] ), CALCULATE ( COUNT ( Purchases[UserId] ) ) = SELECTEDVALUE ( NewTable[Count of Purchases] ) ) )
Zubair_Muhammad Thank you for answer) But it work wrong when I filtring data with date slicer! Please check my example: https://www.dropbox.com/s/apwwg61aq7ty9or/ExampleWithDate.pbix?dl=0
Hi Anonymous
try this approach.
See the attached file as well
First create a calculated table
NewTable =
SELECTCOLUMNS (
GENERATESERIES ( 1, MAX ( Purchases[Count of Purchases] ) ),
"Count of Purchases", [Value]
)
Then a Measure
No. of users =
COUNTROWS (
FILTER (
VALUES ( Purchases[UserId] ),
CALCULATE ( COUNT ( Purchases[UserId] ) )
= SELECTEDVALUE ( NewTable[Count of Purchases] )
)
)
- Anonymous7 years agoNot applicable
Zubair_Muhammad , this is so great!:smileyhappy: But there is one thing: is there any way to filter list of users, when I click on the cell of "Count of Purchases"?
- Zubair_Muhammad7 years agoCommunity Champion
Anonymous
I think you can establish a relationship between the columns "Count of Purchases" in Purchases and New Table
Then it would work
- Anonymous7 years agoNot applicable
Zubair_Muhammad Thank you! It works! I will try this on a large amount of data =)