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
Location - String
Area - Number
using a slicer, the user is able to click on the project name and then select yes or no if that name should be anonymised.
I would like to anonymise the project name and then sort the selection according to area to assign a chronological letter.
This is the data table
I have selected Project A, E , F, G for a bar chart and have selected the names are anonomised, therefore the output I'm looking for is
Is this possible?
Any advice would be much appricated.
Go to Solution.
Hi @Fali324 ,
First create a new table:
Anonymise Name = ADDCOLUMNS(GENERATESERIES(0,DISTINCTCOUNT('Table'[Project Name]),1),"Name",UNICHAR(UNICODE("A")+[Value]))
Then create a field parameter:
Add a new column to the parameter table:
Boolean = IF([Parameter Order]=0,"False","True")
Create a slicer:
Apply the measure to the column chart:
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])
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
View solution in original post
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.