I am new to Power BI and am trying to use the Up and Down coloured arrows as indicators along with some calculations. I have written the following DAX statement and I have checked each condition individually and there are no errors.
Arrows = SWITCH(
TRUE(),
[No of Audits CY] >= [No of Audits LY], UNICHAR(9650),
[No of Audits CY] <= [No of Audits LY], UNICHAR(9660),
UNICHAR(9640)
)
The two elements in the SWITCH statement are measures as well rather than fields from a table.
The issue here is that when I try to show the output “Arrow” I seem not to see what I expected (i.e. an arrow pointing up or down). I have used a Card, a Table and I have even tried formatting as a String (yeah I know) but I just cannot get the Arrow showing up. In fact, when I add the measure to a visual, it reverts to “First Arrow” - it seems to be thinking that there are more than one of these but there should just be a singular value. The two comparative measures also have singular values.
What am I missing, ignoring or doing incorrectly that the arrow symbols do not show?
PS - I even tried using other UNICODE values and the same issue occurs. Any help will be highly appreciated
@prembij Welcome to the Enterprise DNA and thanks for posting the question on the forum. To get a solution, it is requested to please share your sample PBIX file for the experts & members to look at.
Many thanks for your responses. I have attached a PBIX here (sanitised) showing the key measures used show the calc. In the visuals I have shown, as a Card, the Current Year and Last Year counts. I have then put in a table that shows the 2 measures as well as the Arrows measure which has the UNICHAR statements. As you can see the arrows do not show up. I am sure I am missing a step somewhere.
Thanking you so much for all your assistance with this
@prembij
You have to use a measure instead of a calculated column. I just copied and pasted your code in a measure and getting the required results now.
@prembij You are welcome. The problem was when you created a calculated column, your UNICHAR code was going row by row and getting the result as 1 for every row for both years. This way both years had the same count and was showing a blank result in return.
Very glad we were able to help. This is a good reminder though as to why it’s always best to post a PBIX file with your initial question - that would’ve allowed us to spot the problem right away, and solve this in one quick response.