Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
joshrussin
Creator III
Creator III

Colors by expression help.

Hey everyone,

Making a simple bar chart here and trying to get my colors by expression to work. They are still all the same color. Here is my example data.

attend.PNG

I am trying to get the table to show the percentage of employees every day based on Area_Emp.

So first I need to get Actual_Emp/FTE_Emp to get percentage, then make that either blue if below .95% or red if over .95%.

Here is the expression I am using.

Created a variable vAttend =Sum({$<Date_Emp={"$(=Date(Today()-3))"}>} (Actual_Emp / FTE_Emp))

Color expression in bar graph

if (sum(vAttend) < 0.95, '#f93f17', '#f93f17')

Currently they are all red.

44 Replies
joshrussin
Creator III
Creator III
Author

LOAD
    Date_Dash,
    Month(Date_Dash) as vLM,
    Year(Date_Dash) as vLY,
    Program_Dash,
    UOM_Dash,
    Status_Dash,
    Ave_Cost_Dash,
    Processed_Dash
FROM [lib://AttachedFiles/OB_Summary_Data.xlsx]
(ooxml, embedded labels, table is OB_Dash_Data);

LOAD
    Date_Emp,
    Area_Emp,
    FTE_Emp,
    Actual_Emp
FROM [lib://AttachedFiles/Emp_RD.xlsx]
(ooxml, embedded labels, table is Emp_RD);

Let vAttend = Sum({$<Date_Emp={"$(=Date(Today()-2))"}>} (Actual_Emp / FTE_Emp));

data.PNG

sunny_talwar

Not sure I understand... I was asking you if you declare it in the script or are you doing it on the front end? Not telling you to do it in script. Did you just add it?

effinty2112
Master
Master

Hi,

As Pankaj says you should paste the doc into the Apps folder but you can also drag and drop your app from any folder onto the desktop hub and the app will open but you won't get an icon appearing in the hub. A drag and drop is good for a file you might only open once or twice and you won't want to add more icons.

Cheers

Andrew

joshrussin
Creator III
Creator III
Author

It was declared in the front end. I just tried adding to script sorry. I moved it back and still all same color.

sunny_talwar

Not sure, may be share the new reloaded application?

joshrussin
Creator III
Creator III
Author

updated

jmvilaplanap
Specialist
Specialist

Hi


Is the same value in both (true and false)


if (sum(vAttend) < 0.95, '#f93f17', '#f93f17')

joshrussin
Creator III
Creator III
Author

right now they are set to red(), blue()

jmvilaplanap
Specialist
Specialist

Then, now it should works.

Is working now?

joshrussin
Creator III
Creator III
Author

it is not working.