cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO CALCULATE COUNT ON DIMENSIONS IN BEX

Former Member
0 Kudos

Hi gurus

I am beginner of SAP BI

I have a data in my query level like this 2000 records for caleder year 2009.

Here units and ctl are key figures in columns.

calender year, feeder name and cust name are dimensions in rows level

Ex: output on rsrt screen

calender year              feeder name                   cust name             units(KWH)       ctl (KWH)

2009                             xxxx                                aaa                       x                      A

2009                               "                                    bbb                       y                      B

2009                             zzzz                                ccc                       x                      C

"                                       "                                    "                          "                        "

"                                   yyyyy                                "                          "                        "

"                                       "                                    "                          "                        "

"                                       "                                    "                          "                        "

"

1.)  I would like to count number of cust names based on feeder name, here each feeder name contains some number of cust names.

I would like to calculate how many cust names for feeder xxxx,how many cust names for feeder yyyy andhow many cust names for feeder zzzz

like that way I need to count.

2) I also need to count number of feeder name based on the year 2009

I hope you understand the issue.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

KodandaPani_KV
Active Contributor
0 Kudos

Hi Kohli,

Are you maintaining any constant value KF as 1.

As my understanding if you want count number of customer and feeders

1. create one KF with properties of DEC and add in dso and Cube level and transformation level give constant value 1. its easy calculate the customer and feeders

2. after work on exception aggregation.

hope it will help.

Thanks,

Phani.

Answers (6)

Answers (6)

Former Member
0 Kudos

Thanks for all, I got it

Former Member
0 Kudos

Thanks Kodandapani,

I sort it out quickly

Former Member
0 Kudos

Hi,

Create a replacement path variable on the dimension you want to use as count.  Then create a formula, make use of this replacement path variable basically you've to use if..else condition in BEx query.

I had came across similar kind of requirement and proceeded like the same.

Regards,

Antony Jerald.

anshu_lilhori
Active Contributor
0 Kudos

Hi,


1.)  I would like to count number of cust names based on feeder name, here each feeder name contains some number of cust names.

I would like to calculate how many cust names for feeder xxxx,how many cust names for feeder yyyy andhow many cust names for feeder zzzz

like that way I need to count.

First make one CKF and give constant value as 1.---Hit the aggregation tab--Exception aggregation as count of all values that are not equal to zero--Reference characteristic as Customer.

Now create RKF based on this CKF--Restrict it with feeder = XXX.

Like this make separate RKF for each feeder type for which you need the count.

In the same way you can get the count for the year as well.

Regards,

AL

former_member182470
Active Contributor
0 Kudos

Please search forum for "How to calculate count of documents in Bex".

cornelia_lezoch
Active Contributor
0 Kudos

Hi Kohli,

go to the key figure properties.

there are different choices for "calculate single values" and "calculate result as".

There you can choose count options.

regards

Cornelia