Forum Discussion
Fali324
3 years agoHelper II
Anonymize names and assign Letters
Hi, I've been stuck on the following problem and hoping someone can help me on this. I have a data table which has the following columns: Project Name - String Anonymise - Boolean Locatio...
- 3 years ago
Hi Fali324 ,
Please try:
First create a new table:
Anonymise Name = ADDCOLUMNS(GENERATESERIES(0,DISTINCTCOUNT('Table'[Project Name]),1),"Name",UNICHAR(UNICODE("A")+[Value]))Output:
Then create a field parameter:
Add a new column to the parameter table:
Boolean = IF([Parameter Order]=0,"False","True")Output:
Create a slicer:
Apply the measure to the column chart:
Measure = var _a = ADDCOLUMNS('Table',"Index",RANKX('Table',[Area],CALCULATE(SUM('Table'[Area])),ASC)) var _b = CALCULATE(SUM('Table'[Area]),FILTER(_a,[Index]=SELECTEDVALUE('Anonymise Name'[Value])+1)) var _c = SUM('Table'[Area]) return IF(SELECTEDVALUE(Parameter[Boolean])="True"&&ISFILTERED(Parameter[Boolean]),_b,_c)Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
esingh
1 year agoHelper I
Hi
How to make this solution work if we have multiple entries in the dataset for different institution.
Thanks
Ekam