Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

Days and hours in Bar chart

Hi Team,

I have a value of 1.2 which i'm able to show it in Bar chart.

But i wanna show it as 1 day and 4.8 Hrs.   (0.2*24) = 4.8

Since this is not a unit, i'm not able to visualize in bar chart.

Can someone please help?

Any help is highly appreciated!!

Please see attachment.

1 Solution

Accepted Solutions
vvira1316
Specialist II
Specialist II

Hi,

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';

LOAD * Inline
[
Id, Value
1, 1.2
2, 2.3
3, 3.4
4, 1.5
]
;

DaysNHrs.PNG

bar expression

=dual((Floor(Avg({<Id>}Value)) & ' Day ' & Ceil(Avg({<Id>}Value)) * 2.4 & ' Hours'), Avg({<Id>}Value))

View solution in original post

5 Replies
vvira1316
Specialist II
Specialist II

Hi,

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';

LOAD * Inline
[
Id, Value
1, 1.2
2, 2.3
3, 3.4
4, 1.5
]
;

DaysNHrs.PNG

bar expression

=dual((Floor(Avg({<Id>}Value)) & ' Day ' & Ceil(Avg({<Id>}Value)) * 2.4 & ' Hours'), Avg({<Id>}Value))

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can format the value as an Interval.

2017-09-14_16-04-57.png

2017-09-14_16-05-23.png

vvira1316
Specialist II
Specialist II

Hi Mark,

If you have found a solution then can you please close the thread.

Thanks & Regards,
Vijay

markgraham123
Specialist
Specialist
Author

Sorry for the delay.

I just marked it as closed.

markgraham123
Specialist
Specialist
Author

Thansk for your help Rob!