Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
arulsettu
Master III
Master III

chart problem

hi i created a chart. and i added this code to

=class(floor((Today()-BirthDate)/365.25),$(agerange),'Age')

calculated dimension.

expression is sum(sales).

i created a slider and added a variable agerange.

but the result is nothing like thisCapture.PNG.png

i need to display like this

Capture.PNG.png

1 Solution

Accepted Solutions
maxgro
MVP
MVP

copy your qvw in the same folder (Sale management 1.qvw)

modify  Sales management 1.qvw

- binary load your sales management.qvw

- drop HumanResources_Employee

- rebuild HumanResources_Employee with a random birth date using ContactID from OrderHeader

this is the SCRIPT in Sale management 1.qvw

Binary [sale management.qvw];      

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;($#,##0.00)';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='M/D/YYYY';

SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

DROP Table HumanResources_Employee;

HumanResources_Employee:

LOAD

  ContactID,

  floor(Today() -rand()*20000) as BirthDate;

  ;

Load distinct

  ContactID

  //BirthDate

Resident OrderHeader;

exit script;

View solution in original post

20 Replies
arulsettu
Master III
Master III
Author

here i attached my app in customers tab check the chart

any one can help? thanks...

maxgro
MVP
MVP

in your database you have

the table HR_Employee with ContactID and BirthDate

the table OrderHeader with ContactID and TotalDue

but the ContactID with TotalDue hasn't the BirthDate (they are missing in HR_Employee)

and the ContactID with BirthDate doesn't have TotalDue (they are missing in OrderHeader)

first put in place your db

second it seems to me you're using the variable agerange in calculated dimension but the variable is missing

arulsettu
Master III
Master III
Author

hi Massimo

i have created variable agerange. hoe can i display the data any idea ? thanks...

MK_QSL
MVP
MVP

Dear Arul,

I have created a straight table for BirthDate and SUM(TotalOverDue)... There is no relation between both of them.

BirthDate SUM(TotalDue)
$140707584.82
$140707584.82
maxgro
MVP
MVP

something is wrong in the data of your db

the ContactID of OrderHeader should be also present in HumanResource_Employee table

for now they are missing

I can't fix your source data (access db?)

Are you sure in access db you use as sourcedata,

the ContactID of HumanResource_Employee

are the ContactID of OrderHeader?

I don't think. Try to check this first in Access.

maxgro
MVP
MVP

yes probably the ContactID are different in access db (the source)

arulsettu
Master III
Master III
Author

hi

contact id in HumanResource_Employee table

and contact id sales_orderheader table are linked. and its all in same database... i can see the relation in table viwer

arulsettu
Master III
Master III
Author

hi

i think contact id in both tables are linked... am i correct?

maxgro
MVP
MVP

the are linked (correct)

but they always have different ContactID (problem; from the access db I presume)

if you create a chart like this and two listbox BirthDate and SalesOrderID you can find the problem

ContactID with TotalDue and without BirthDate

ContactID with BirthDate and without TotalDue

customerid.jpg