Forum Discussion
Share your thoughts on visual calculations (preview)
Hello,
I've got an issue.
When I'm using fx to add the RUNNINGSUM I got the message below.
It referes to a column with the weeks.
Whatever the measures I got this error
My table is quite simple
first of all, thank you for trying out visual calculations and I am sorry you weren't successful the first time around. I believe I understand what is going on here: the [Field] in the template is the numerical field you want to sum, so that's Snapshot in your case. RUNNINGSUM([Snapshot]) should work. Please try it and let me know if it works as expected. thanks again!
- gregst2 years agoFrequent Visitor
Hello
The error message is coming at the beginning, meaning when I click on "New Calculation" the error message is popping up.The table is quite simple, I have the week and for this example I only put the measure Snapshot = 1
with a format as Whole number.
Even if I continue and create Calculation = RUNNINGSUM([Snapshot]) the screen stay with the error message.
The calendar I use to get the Week is linked with other table in my model. Could be the problem ?
I did several try and it seems the issue is coming only if I use the table "Calendar" 😞
- gregst2 years agoFrequent Visitor
Hello again,
I solved my problem. The naming of the column seems weird for the New Calculation.
If I rename my column Calendar[ST Week] with ST Week all is working well.
Is it possible the square bracket [ ] create the problem ?- jeroenterheerdt2 years ago
Microsoft Employee
it's likely the 'Calendar' part that got confused as a table reference. In general I'd recommend not naming columns like that as Power BI is prone to think A[B] is a reference to a column B on a table A.
- Frankie_Vannini2 years ago
Advocate I
Hi there
I've got a small vertical aligment issue the minute I use a unichar icon to display a negative or positive icon related to the value, waiting for conditional formatting option. This happens only using DIN Font bigger than 18 points
In essence I use this code for the visual calculation:
YoY % =VAR Curr = [ITEM]VAR Prev = PREVIOUS([ITEM],COLUMNS)VAR Result = DIVIDE(Curr-Prev,Prev)VAR Color_Icon = if (Result >=0, UNICHAR(128994),UNICHAR(128308))RETURNif( Result = BLANK(),BLANK(),CONCATENATE(Format ( Result, "0.0% ") , ColorIcon))the result is this one:
 
so using font DIN 14 on the left no significant vertical misalignement, while using DIN 34 I have a vertical misalignement. No issues with other fonts
By the way, any suggestion to change numbers in green or red using DAX and/or HTML?
Thanks
F