Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression for dimention till one decimal in pivot table

Hi community,

I have calculated employee Vintage(Employee Joining Date - Current Date) in Pivot Table in Dimention leval, but Field showing value in multipale decimal number.i want solution only till one decimal in the dimention level.

e.g.

One employee_id-001 his actual vintage is (8.2) year but in qlikview it showing (8.223456789) like this.

So, which function i have to used then i will get logical answer (8.2) till one decimal in dimention level?

I have used Left(),Right(),Mid() function,but these are not given proper solutions.

Thaks in advance

1 Solution

Accepted Solutions
ajaykumar1
Creator III
Creator III

can you try this;

=NUM(NUM(DATE(PERIOD,'DD/MM/YYYY')-DATE(RM_JOININGDATE,'DD/MM/YYYY'))/366,'########.##')

If you applied the above you will get rounded number(e.g if 2.99 then you will get 3.0)

Regards,

Ajay

View solution in original post

9 Replies
PrashantSangle

Hi,

Use Num()

Like

Num(yourExpression,'##,0.0')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
MayilVahanan

Hi

Try like this with Num() function

= Num(Expression, '#.#')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
avinashelite

Hi ,

Try round() function

Round(yourExpression,'0.1')

saradhi_it
Creator II
Creator II

HI Ishwar

i think you can use this ...Go to properties in Numbers-> Number Format settings->FIxed decimals...........

Regards

Saradhi

ajaykumar1
Creator III
Creator III

Hi,

Go to your table---Right click properties---Number---select your expression in left side---Fixed to 1

Note :Format pattern ###0.0(if you dont want commas)

Regards,

Ajay

Not applicable
Author

Hi EveryOne

thanks for your quik reply,

I have used all of your option but i didn't got solution.

I have paste here my expression for your refernce purpose.

=NUM(DATE(PERIOD,'DD/MM/YYYY')-DATE(RM_JOINING_DATE,'DD/MM/YYYY'))/366

PrashantSangle

Hi,

Did you try my solution

=NUM(DATE(PERIOD,'DD/MM/YYYY')-DATE(RM_JOINING_DATE,'DD/MM/YYYY')/366,'#,#0.0')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
ajaykumar1
Creator III
Creator III

can you try this;

=NUM(NUM(DATE(PERIOD,'DD/MM/YYYY')-DATE(RM_JOININGDATE,'DD/MM/YYYY'))/366,'########.##')

If you applied the above you will get rounded number(e.g if 2.99 then you will get 3.0)

Regards,

Ajay

Not applicable
Author

Hi Max,

I have used your option but i didn't got actual solution.

thanks to every one given quik reply.