by Eddy Kleinjan » Thu Jan 26, 2012 11:13 am
Looking at the screenshots you sent, I think you should change the column names. The column names that I gave are based on the data source that I used, but you should of course use the ones that come from your data source.
It seems that the column name that holds the flag is called [SHOWED_FLAG], note the underscore. Also in your screenshot, the formula is of the type 'Text (SQL)', but it should be 'INTEGER (SQL)' as the result is used for counting.
Also note that in my example, I'm using the column [Value] to deliver the value from the CASE statement. I don't know what your report looks like, whether you are counting rows for totalling or are adding up a total, but you should change that also in your case statement. If you are counting rows, you could change it to something like this: CASE WHEN [SHOWED_FLAG] = '0' THEN 1 ELSE 0 END.
After you made those changes and both are totaling the values of the formula for '1' and for '0', then you should remove the group on the [SHOWED_FLAG] column as it is no longer needed.
Then you can create the resulting formula like this:
[[D_ShowedFlag0_D]]/[[D_ShowedFlag1_D]]*100
Hope this helps, please let us know.
Best regards,
Eddy