Forum Discussion
Count client names witin custom groups
Hi Community,
New to the Game,
I am in need off some help to Count client names within a custom groups i have built.
Here is the measure i have used to crrate the groups:
I am needing to know how many client names i have placed within these groups.
I know how many clients i have in total, is there away to use the % income per a group and do a sum of some sort to get the count i need.
Can anyone please help me with a solution please.
Thanks John
Well, a quick solution for this can be to add a new Calculated column to your Fact Table with Clients, then simply dragging everything together will be piece of cake.
Let's say the Custom Groups are measured that if the user spent 0-5000 he is Bronze etc., giving this is the correct logic, you can write something like this:SWITCH(TRUE(), [ClientSpent] >= 20001 && [ClientSpent] <= 100000, "Platinum", [ClientSpent] >= 10001 && [ClientSpent] <= 20000, "Gold", [ClientSpent] >= 5001 && [ClientSpent] <= 10000, "Silver", "Bronze")Or please send me a sample data of your client table and we can work this out.
7 Replies
- vojtechsimaSuper User
Hi, Anonymous
I would need to know how your dataset looks like, however, if you have a well-structured dataset with unique IDs, you can simply just drag the fields into Table Visual and Power BI do everything for you:
But if you have unique IDs and want to use a measure, you can achieve the same result with something like this:
CountOfIDsMeasure = COUNTROWS('FTE Year Rodmap')- AnonymousNot applicable
I think the issue is the custom table is not linked to any other table, sits by it self and only has the values that i use to measure against,
so there for there is no client ID within this table, so when try and drag over ClientID it just totals them and ot against the custom groups.
When try and use the Custom Sales by Group, i do not get the option to distinctCount only % or not
- vojtechsimaSuper User
Well, a quick solution for this can be to add a new Calculated column to your Fact Table with Clients, then simply dragging everything together will be piece of cake.
Let's say the Custom Groups are measured that if the user spent 0-5000 he is Bronze etc., giving this is the correct logic, you can write something like this:SWITCH(TRUE(), [ClientSpent] >= 20001 && [ClientSpent] <= 100000, "Platinum", [ClientSpent] >= 10001 && [ClientSpent] <= 20000, "Gold", [ClientSpent] >= 5001 && [ClientSpent] <= 10000, "Silver", "Bronze")Or please send me a sample data of your client table and we can work this out.