Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Tomco21
Starting Member
6 Posts |
Posted - 2011-01-05 : 08:46:24
|
Hi, thanks to everyone who looks at this, this has puzzled me for a week now and i haven't been able to find a solution. I'm fairly new to cube design so please bear with me.I have the data...Child__| Group__ | Class__ | Amount-------------------------------------Steven | Group A | Class 1 | 3000Dan___ | Group B | Class 1 | 4000Grace_ | Group A | Class 2 | 2000Jane__ | Group B | Class 2 | -3000I want to create a conditional calculation on the Amount column based on the sum of the lowest level, so if the sum => 0 then output Amount otherwise output 0. So when i browse on Group -> Child the output will be like...Group A 5000- Steven 3000- Grace 2000Group B 1000- Dan 4000- Jane -3000But when i browse on Class -> Child the output would be like...Class 1 7000- Steven 3000- Dan 4000Class 2 -1000- Grace 0- Jane 0Is this possible? Does this make sense? As i say i am fairly new to this so i may be going about it completely the wrong way, any hints or advice would be greatly welcomed.Thanks,Tomco |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-01-16 : 17:49:08
|
You can use a recurce Common Table Expression for this. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|