Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everybody! I can't GROUPBY my count of my purchases by count of my clients.
That's user table:
That's purchase's table:
And that's what I want:
All this data must be filtered by date slice!
Help me please)
Solved! Go to Solution.
Hi @EgorS
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] ) ) )
Hi @EgorS
In your Purchases Table, you can add this calculated column
Please see attached file with your sample data
Count of Purchases = CALCULATE ( COUNT ( Purchases[UserId] ), ALLEXCEPT ( Purchases, Purchases[UserId] ) )
Then in Table Visual, you can drag the above calculated column and DistinctCount of UserId to get the desired result
@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 @EgorS
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] ) ) )
@Zubair_Muhammad , this is so great! But there is one thing: is there any way to filter list of users, when I click on the cell of "Count of Purchases"?
I think you can establish a relationship between the columns "Count of Purchases" in Purchases and New Table
Then it would work
@Zubair_Muhammad Thank you! It works! I will try this on a large amount of data 😃
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |