cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create new Measures in Custom CDS View App

former_member536943
Participant
0 Kudos
2,726

Hello,

how can I create a new specific measure in the custom cds view app, without using standard cubes?

e.g.: I use the Master Data Table - I_Mkt_Interaction and I want to create the measure called "NumberOfEmailsOpened"
(EmailsOpened is an Interactiontype and has the ID: EMAIL_OPENED)

My understanding is, that I need to make a calculation on the Interactiontype where the ID = EMAIL_OPENED.

Where can I implement the logic and how?

Can anyone give me support in this case?

BR Christof

Accepted Solutions (1)

Accepted Solutions (1)

Abd_Am_K
Active Participant

Hello christofblaickner,

There are several ways to achieve this goal. I will try to focus on two ways.

1) Add a "Calculation" in the Elements Field in your custom cds view . In the expression enter the value

 1 

Now in the Element Properties set the aggregation to SUM. In the filter Tab enter the expression "IA_TYPE"="EMAIL_OPENED". This way when you include this in your Analytical Cube and Create a Query on it, you will see aggregated EMAIL_OPENED interactions.

2) Add a "Calculation" in the Elements Field in your custom cds view . In the expression enter the value

case when I_Mkt_Interaction.InteractionType='EMAIL_OPENED'
then
  1
else
  0
end

. Now in the Element Properties set the aggregation to SUM. Now when this view is part of a Analytical Cube and Openend in a Query, you will get aggregated counts for number of interactions.addcounter-4.pngaddcounter1.png

Thanks,

Abdullah Amer

Hammouti48
Explorer
0 Kudos

Hellp Abdullah,

My name is Badr-Eddine and I'd like to ask a question about creating measures in Custom CDS Views.

I followed the steps you explained in your answer but unfortunately it doesn't work for me. The goal is to be able to display in this CDS view the number of open tasks for putaway and picking and calculate the accuracy (%) of the putaway and picking process. After using the formula to calculate the open tasks, the result is not what I expected: the preview shows 0 for this calculation.

I've had trouble creating a calculation using "Custom CDS Views" and "Custom Analytical Queries" because I don't understand which syntax to use.

 

PS: I'm only using "A" for testing purposes, because in the system 'Open' is a blank space (" ") as Warehouse Task Status (Please refer to the screenshots attached) 

Thank you in advance for your answer!

Hammouti48_1-1708093547918.png

Hammouti48_0-1708094271573.png

 

Hammouti48_2-1708093599453.png

Hammouti48_3-1708093862089.png

Hammouti48_4-1708093878301.png

Badr-Eddine

 

 

 

 

Answers (0)