Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

markgraham123
Contributor II

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.

Tags (1)
1 Solution

Accepted Solutions
vvira1316
Valued Contributor II

Re: Days and hours in Bar chart

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))

5 Replies
vvira1316
Valued Contributor II

Re: Days and hours in Bar chart

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))

Re: Days and hours in Bar chart

You can format the value as an Interval.

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

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

vvira1316
Valued Contributor II

Re: Days and hours in Bar chart

Hi Mark,

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

Thanks & Regards,
Vijay

markgraham123
Contributor II

Re: Days and hours in Bar chart

Sorry for the delay.

I just marked it as closed.

markgraham123
Contributor II

Re: Days and hours in Bar chart

Thansk for your help Rob!

Community Browser