For an application, I need to reduce data but keeping the total result. Example :
Tab_Data :
Region
NetworkId
Date
Sale
1
1
jun.11
15
1
1
jul.11
64
1
2
jun.11
41
1
2
jul.11
12
2
1
jun.11
46
2
1
jul.11
23
2
2
jun.11
21
2
2
jul.11
41
If I reduce on Region = 1, the user can see his sale (15, 64, 41, 12) and the total country (263). He can't see details for Region 2.
So I create a new data island table :
Tab_Data_total :
Total_NetworkId
Total_Date
Total_Sale
1
jun.11
61
1
jul.11
87
2
jun.11
62
2
jul.11
53
I use dimensionality in my result table to display the details for user in NetworkId1 and the total in total line.
My problem is in my total expression. I wrote :
sum(if(Total_NetworkId=NetworkId AND Total_Date=Date, Total_Sale))
If Date correctly matching (for 1 or more selections) it doesn't work for NetworkId. I don't know why ! I use this type of expression many time to use data island table.
After a litle control with isnum(), i see that my field NetworkdId is a numerical field. But my new field Total_NetworkId not ! Do you think that's the explanation of my problem ?
I don't understand why QV transform this numerical field into something else in the new table. I try to force a numerical value for Total_NetworkId by using num(), but it doesn't work !
Thank you for your attention and many many thanks for help !!!