Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Buddika
Contributor
Contributor

How to remove zeros from a bar graph

Hi

I want to visualise hospitalisation data on a special day, day after that special day and compare it with previous week.

But my graph shows zero values. can you help me to remove that from my graph.

 I used if statements to define A day and day after A day  in my script.

Buddika_1-1615319648517.png

 

5 Replies
Anil_Babu_Samineni

There are many ways to remove such. If you help us with sample document to demonstrate the same we will try to fix otherwise on assumption, You can try expression (If your expression is Sum(Measure)) it should be this

Sum({<WeekDay={"=Sum(Measure)>0"}>} Measure)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Buddika
Contributor
Contributor
Author

 

My expression is count({<alcohol={'Y'}, day_after_A_day = {'1'}}>} ed_id)

Definition of A day and day after A day is as follows (in script)

if(Month(aedArrivalDateTime)='Dec',
if(Day(Date(Floor(aedArrivalDateTime)))< '8',
if(WeekDay(Date(Floor(aedArrivalDateTime)))='Sat' , 1, 0), 0), 0) AS A_day,


if(Month(aedArrivalDateTime)='Dec',
if(Day(Date(Floor(aedArrivalDateTime)))< '9' and (Day(Date(Floor(aedArrivalDateTime))))> '1',
if(WeekDay(Date(Floor(aedArrivalDateTime)))='Sun' , 1, 0), 0), 0) AS day_after_A_day,

The graph shows that the value is zero on Sunday because A day is a Saturday.

 

Thanks

Buddika
Contributor
Contributor
Author

Hi,

My expression is count({<alcohol={'Y'}, day_after_A_day = {'1'}}>} ed_id)

Definition of A day and day after A day is as follows (in script)

if(Month(aedArrivalDateTime)='Dec',
if(Day(Date(Floor(aedArrivalDateTime)))< '8',
if(WeekDay(Date(Floor(aedArrivalDateTime)))='Sat' , 1, 0), 0), 0) AS A_day,


if(Month(aedArrivalDateTime)='Dec',
if(Day(Date(Floor(aedArrivalDateTime)))< '9' and (Day(Date(Floor(aedArrivalDateTime))))> '1',
if(WeekDay(Date(Floor(aedArrivalDateTime)))='Sun' , 1, 0), 0), 0) AS day_after_A_day,

The graph shows that the value is zero on Sunday because A day is a Saturday.

 

Thanks

Anil_Babu_Samineni

Can you please share sample data set to look?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Buddika
Contributor
Contributor
Author

Hi

Pls see the attached data set.

 

Thank you