Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a bar chart where I need to add Saturday and Sunday values to Friday bar. And Saturday and Sunday bars should not be displayed on the chart. Please find the below example.
I have an inline load code as below.
load * Inline [
Date, Count
31/08/2020, 0
01/09/2020, 10
02/09/2020, 20
03/09/2020, 30
04/09/2020, 10
05/09/2020, 10
06/09/2020, 10
]
Here the dates 31st Aug to 6th Sep represent Monday to Sunday.
When I developed a bar chart out of this code 'Date' as dimension and 'Count' as measure the chart display as below.
When I try to add Saturday and Sunday values to Friday bar (5th and 6th values added to 4th) the chart looks like below.
Expression used:
if( rowno()<=4, sum(Count),
if(rowno()=5, RangeSum(below(sum(Count),0,3)))
)
But I need to display the values only from Monday to Friday. If I use ‘Supress zero values’ option in Presentation tab, then I am missing Monday value also as below (31st Aug missing which is a zero value).
In this scenario how can I get Monday to Friday values only though there are zero values for any bar. Please help.
Regards
SasiK
I could find the answer for this by changing the expression to below.
if( rowno()<=4, if(sum(Count)=0, '',sum(Count)) ,
if(rowno()=5, RangeSum(below(sum(Count),0,3)))
)
Regards
SasiK
I could find the answer for this by changing the expression to below.
if( rowno()<=4, if(sum(Count)=0, '',sum(Count)) ,
if(rowno()=5, RangeSum(below(sum(Count),0,3)))
)
Regards
SasiK