conditional formatting with strings
2 TopicsCreate colouring on bar chart depending on conditions of a column and the count
Hi, I am looking for help to create colouring on a bar chart depending on certain conditions. I have a bar chart which displays the column Performance. The values in this column are categories. The graph shows the grand total count (%) of each category. I would like to do conditional formatting colouring on the bars with the following conditions: Meets Expectations is colour orange when, Meets Expectations + Exceeds Expectations > 90 Marginal is coloured yellow when, Marginal + Below Expectations > 40 Exceeds is coloured green when, Exceed Expectations > 30 Below is coloured red when, Below Expectations> 15 Since I am doing a grand total count of each category, I have tried to create measures for each performance category to count the grand total, but realized this does not work as it will not take the other measures into account. This is what I did: I created this conditional formatting measure Conditional Formatting Measure = Switch(TRUE(), SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Meets " && [Meets%]+[Exceeds%] > 90, "orange", SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Marginal" && [Marginal%] + [Below%] > 40, "yellow", SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Exceeds" && [Exceeds%] > 30, "green", SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Below" && [Below%] > 15, "red", "grey") Where [Exceeds%], [Meets%], [Marginal%], [Below%] are measures I created to try to capture the grand total % count. The calculations I used for each were similar: Exceeds% = [Count ExceedExpectations]/ COUNTROWS(FILTER(ALLSELECTED('A Table'),'A Table'[PerformanceLevel] IN {"Below Expectations","Marginal","Meets Expectations","Exceed Expectations" }))*100 After doing this and testing, I realized by doing the separate measures for each performance category, it was not taking the other categories into account. When I tried to sum them in the conditional formatting measure, one of them would be counted as 0. Perhaps I am overcomplicating and there is a much simple way to do this. This is a link to sample workbook: google drive How can I do this? I would appreciate any guidance and help. Thank you689Views0likes4CommentsConditional Formatting with String Fields May 2023 PBIRS
We just upgraded to the May 2023 release of PBIRS and I was hoping to take advantage of the new conditional formatting by string field. The data source for my report is a live connection to SSAS. Are there limitations on the use of the new string field function if you are using a live connection? Or maybe this feature is limited to certain visuals. I have attempted to do it in a table visual and under rules for the specified value the only options available are Count (Distinct) and Count. I expected to see First and Last other options in the Summarization drop-down box, but I do not see those: Any help in understanding the limitations of this function would be greatly appreciated! Update: Another thing I noticed in testing is that if I select Rule as the format Style and then go back to Gradient and then back to Rule again the If value is Text then rule shows up. But I still don't have an option for First and Last in the Summarization drop-down:896Views0likes5Comments