Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
settu_periasamy
Master III
Master III

dispaly quarter value - without using data model

Team,

I have the data with date values.  I need to create the list box to  display the Quarter values (Q1, Q2, Q3 and Q4) without modifying the data model(Actually, I don't have the access for data model. ).

Is it possible to do that?

Regards,

Sethu

9 Replies
er_mohit
Master II
Master II

its better to create in script side if don't then use list box-->properties-->general--> fields drop down it go to expression side

write this

'Q' & Ceil(Month(TempDate)/3)  if you want to start quarter first to jan

if you need to start quarter from apirl then try this expression

'Q'&If(Month(QuarterStart(TempDate,4))='1' ,4,Div(Month(QuarterStart(TempDate,4)),3))

here TempDate is my date field replce with your own

hope it helps

narender123
Specialist
Specialist

Hi,

For linking between your Quarter and data ,you need to add quarter in script.

eg:


calender:

Load * inline

[

Month,Quarter

jan,Q1

feb,Q1

mar,Q1

apr,Q2

may,Q2

...........

.........

dce,Q4

];

join this Month with your fact table Month.

if you have monthno in fact table then you could write 1,2,3,4..12 in themonth column in replacement of jan,feb..dec and join with monthno of fact table.

Thanks

Narender

settu_periasamy
Master III
Master III
Author

Hi Mohit,

Thank you. 

It was helpful. it will display the quarter values based on the selection. I need the Quarter valued based on all records.

Thanks in Advance.

settu_periasamy
Master III
Master III
Author

Hi Narendar,

I  need to display the quarter values, without editing the script. (Expression would be fine)

narender123
Specialist
Specialist

Hi Settu,

Please see the attch file.

I have taken the month field data from xl file to show the demo.But in your data model there should be  month field ,so you dont need to create xl file in your QVW. Just take the month field data that is already in your qvw file.

Thanks.

er_mohit
Master II
Master II

that's why i told you first its better to do it in script side

it doesn't effect on your data model where is your date present there you add this farmula because on expression side it only based on that records rather on other

hope it helps you

settu_periasamy
Master III
Master III
Author

Hi Narendar,

Already i have the date and Month field in my qvw file. Just i need to display the all Quarter values without modifying the script.

I tried the Mohit Answer. (Q' & Ceil(Month(TempDate)/3)) - This display the quarter values based on the selection. But I need to display the all quarter values.

can you help me on this?

settu_periasamy
Master III
Master III
Author

Understood Mohit. The probelm is, i don't have the access to modify the script.

narender123
Specialist
Specialist

Sorry Settu, bymistake i didnt show the qvw in last reply.Now i have attached it.please see it.

Thanks.

Narender