Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello All,
I need to change the title dynamically when filter selection is changed.
1. When the report open (no specific projects are selected) it should display "All"
2. When ONLY one project is selected, it should display that specific project name
3. When more than one project is selected, it should display "Multiple"
To achieve this, below is my approach,
SeletedProject =
var allcount = COUNTX(ALL(Table1[Project Name]),Table1[Project Name])
var currentcount = COUNTX(Table1,SELECTEDVALUE(Table1[Project Name]))
var selectedproject = SELECTEDVALUE(Table1[Project Name])
RETURN
IF(ISBLANK(selectedproject),"All",IF(currentcount > 1 && currentcount < allcount, "Multiple",selectedproject))
However, I was able to get "All" and specific project name, but not "Multiple" when i selected more than one project. Insteas it's showing me "All", when i selected multiple projects.
Any suggestions?
Solved! Go to Solution.
@slanka Please try changing your measure as below
SeletedProject = var allcount = COUNTX(ALL(Table1[Project Name]),Table1[Project Name]) var currentcount = CALCULATE(COUNTROWS(Table1),ALLSELECTED(Table1[Project Name])) var selectedproject = SELECTEDVALUE(Table1[Project Name]) RETURN IF(currentcount=1,selectedproject,IF(currentcount=allcount,"All","Multiple"))
Proud to be a PBI Community Champion
@slanka Please try changing your measure as below
SeletedProject = var allcount = COUNTX(ALL(Table1[Project Name]),Table1[Project Name]) var currentcount = CALCULATE(COUNTROWS(Table1),ALLSELECTED(Table1[Project Name])) var selectedproject = SELECTEDVALUE(Table1[Project Name]) RETURN IF(currentcount=1,selectedproject,IF(currentcount=allcount,"All","Multiple"))
Proud to be a PBI Community Champion
I had to do a little tweak of using DISTINCTCOUNT based on my dataset. Other than that this formula works perfect..!! THank you so much!
Not exactly what you are looking for.. but have you tried COUNTROWS(ALLSELECTED))?
Shows either a single college name or College (M) if multiple selected
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |