Forum Discussion
unique vales based on
i have the following data
| Fisrt name | last name | degree | payment | ID | |
| jack | Eden | Eden exapmle.com | bachelor | 250$ | 2160003021 |
| lora | Teigen | Teigen example.com | bachelor | 340 | 3160003021 |
| jousef | Hawke | Hawke example.com | bachelor | 100 | 4160003021 |
| jack | Eden | Eden1exapmle.com | bachelor | 500$ | 5160003021 |
and i want a bar graph to show me how much each one takes based in ids
y-axis : first name
x-axis: sum of payment
i wrote the following code but it mixes the jacks and i need uniqe jack only
mina97 , I now get what you wanted in your code.
So, create a calculated column in your table:
name unique = VAR same_names = CALCULATETABLE ( SUMMARIZE ( Specialists, Specialists[ID], Specialists[First_Name] ), ALLEXCEPT ( Specialists, Specialists[First_Name] ) ) VAR ranking = RANKX ( same_names, Specialists[ID],, ASC, DENSE ) VAR blanks = REPT ( UNICHAR ( 8204 ), ranking - 1 ) VAR res = Specialists[First_Name] & blanks RETURN resAnd use this column for the x-axis of your visual:
8 Replies
- ERDCommunity Champion
mina97 , I now get what you wanted in your code.
So, create a calculated column in your table:
name unique = VAR same_names = CALCULATETABLE ( SUMMARIZE ( Specialists, Specialists[ID], Specialists[First_Name] ), ALLEXCEPT ( Specialists, Specialists[First_Name] ) ) VAR ranking = RANKX ( same_names, Specialists[ID],, ASC, DENSE ) VAR blanks = REPT ( UNICHAR ( 8204 ), ranking - 1 ) VAR res = Specialists[First_Name] & blanks RETURN resAnd use this column for the x-axis of your visual:
- mina97Helper III
IT WORKS perfectly THANK YOU SO MUCH!!!! you are a lifesaver
- mina97Helper III
hi please i need extra help i reallt appreciate it
how can i assign uniqe ID to the most frequent first name
because i have a lot of misspelled names and i want to unifiedthem
i have the following data
Fisrt name last name email degree payment ID jack Eden Eden exapmle.com bachelor 250$ 2160003021 lora Teigen Teigen example.com bachelor 340 3160003021 jack Edin Eden1exapmle.com bachelor 600$ 5160003021 jack Eden Eden1exapmle.com bachelor 500$ 5160003021
- SamInogicSuper User
Hi mina97 ,
Instead of custom column with DAX expression, you can try creating Index column within Power Query in order generate the unique numbers,
Then you can design chart with below specifications,
Thanks!
Inogic Professional Services Division
Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!
Drop an email at [email protected]
Services: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
- mina97Helper III
hi SamInogic i appreciate your help
but jack who's id is 2160003021 had 2 payemnts 250$ and 600$ as 2 seperated rows but identical columns inputs except for payment column
and i need the graph to show that this jack got 850$ as a total payment hence, the index method is not useful in this case.
please help me and Thank you for your response
- ERDCommunity Champion