Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text in chart

hi all

I have a bar graph showing hospital wise bill expense

Dimension of this graph is "hospital" which is checked with option suppress when value is null in dimension tab..

show total option is also checked in dimension limit tab that is why graph total bar shows e.g $10,000

while expense is more then that i.e $12,000

expression of this graph is sum(rate*qty)

now i want to add text in graph to show the total expense amount as a text in graph... in my case i have added the same expression in text in chart field which shows the amount of $12,000 as a text... while as i mention the supress null result is 10,000 how can i show the $10,000 value in the text field of graph....

what changes to be made in expression sum(rate*qty) ..???????? plz advice

Regards

Fahad

1 Solution

Accepted Solutions
Not applicable
Author

I would do it like this:

=sum({<hospital = {"*"} >} rate * qty)

This has a set analysis that will first select all the possible values from hospital field and then calculate the sum for that data set. NULL is not a value that can be selected, so those rows get excluded by doing this. Result should be the 10 000 you wanted to see.

View solution in original post

4 Replies
nizamsha
Specialist II
Specialist II

As i Understood null value is showing 10,000 u want to show in bar if its so mean

len(trim(hospital))>=1,Hospital,'Others')

Not applicable
Author

thanks for reply Nizam,

Actually hospital bills amount is 10000 and null amount is 2000 so total become 12000

I don't want to show the null data in bar...(bar is ok without null values 10000)

I want to minus the null amount from text in chart expression...... which is showing all hospital + null amount 12000

expression is sum(rate*qty)

what to change in expression to minuse null amount and show only hospistal amount

thnks

Not applicable
Author

I would do it like this:

=sum({<hospital = {"*"} >} rate * qty)

This has a set analysis that will first select all the possible values from hospital field and then calculate the sum for that data set. NULL is not a value that can be selected, so those rows get excluded by doing this. Result should be the 10 000 you wanted to see.

Not applicable
Author

Bingo..............

thanks Mr.Henry that what i wanted