User empty rows as 0 value.


https://www.nevron.com/Forum/Topic5169.aspx
Print Topic | Close Window

By AlexK - 13 Years Ago

Hello,

I have the following data model in a List:

TitleValue [%]
A20
B
C30
A

Now I want to show the average value and use the empty values as 0-value. For example the AVG(Fields!Title) should be 

10 for A (=(20+0) / 2)
0 for B
30 for C

how can I bring it to work?

Regards,

Alexk

By Nevron Support - 13 Years Ago

Hello AlexK,
In order to achieve your requirement, you can do the following:
- In the Pivot >> Data Groupings >> Categories >> General, group by "Title": =Fields!Title
- In the Pivot >> Values >> General >> Data, use the following expression in the Value field: =SUM(Fields!Value) / Fields![RowCount]

Hopefully this helps.