Skip to main content

Movendo Média Cálculo Em Sap B1


Explicar Tipos de condição Deixe-me tentar responder sua pergunta um por um ltbgtExemplo de um Tipo de condição Você define o tipo de condição para um desconto especial de material. Você especifica que o sistema calcula o desconto como um valor (por exemplo, um desconto de INR 1 por unidade de vendas). Alternativamente, você pode especificar que o sistema calcula o desconto como uma porcentagem (por exemplo: um desconto de 2 para pedidos acima de 1.000 unidades). Se você quiser usar ambas as possibilidades, você deve definir dois tipos de condição separados. Esse valor de condição é obtido da visualização Material Master Accounting 1 onde você mantém o preço padrão eo preço médio móvel No Procedimento de Precificação, se todos os três campos estiverem em branco, o respectivo valor de condição fluirá para o documento contábil, desde que a condição seja mantida no VK11. Passos do procedimento de cálculo de preços funcionará da seguinte forma: - ltbgt1) Número do passo Número que determina a sequência das condições dentro de um procedimento. Ltbgt2) Contador de condições Número de acesso das condições dentro de uma etapa no procedimento de precificação. Durante o ajuste automático de preços, o sistema leva em consideração a seqüência especificada pelo contador. Ltbgt3) Tipo de condição O tipo de condição é usado para diferentes funções. No cálculo de preços, por exemplo, o tipo de condição permite diferenciar diferentes tipos de desconto na determinação de saída, entre diferentes tipos de saída, como confirmação de pedido ou nota de remessa na determinação de lotes, entre diferentes tipos de estratégia. Descrição do tipo de condição ltbgt5) A partir do passo de referência (para condições de porcentagem) ltbgt Condição etapa, cujo valor é a base para sobretaxas percentuais. Se você especificar uma etapa para referenciar ao mesmo tempo, os valores de condição dos dois passos especificados e os valores das condições dos passos entre eles são totalizados. Neste caso, as sobretaxas percentuais são calculadas com base no total. Nível CType Descrição FromSt ToSt ActKy 20 A-B2 Salários 30 A-B3 OvertimeWages 40 A-Z1 Férias bônus 10 30 E11 A sobretaxa para o passo 40 é adicionada ao total dos passos 10 a 30. ltbgt6) Para o passo de referência (para percentagens) Condição passo até o qual os valores de condição dos passos anteriores são totalizados. As sobretaxas percentuais são calculadas com base no total. Se você especificar a partir da etapa de referência ao mesmo tempo, os valores de condição dos dois passos especificados e os valores de condição dos passos entre eles são totalizados. Passo CType Descrição FromSt ToStep AcctKey 20 A-B2 Salários 30 A-B3 OvertimeWages 40 A-Z1 Férias bônus 10 30 E11 A sobretaxa para o passo 40 é adicionada ao total dos passos 10 a 30. ltbgt7) Condição determinada manualmente Condições, que são Dado este indicador no procedimento de determinação do preço, só são incluídos na determinação (determinação do preço, determinação do produto, determinação do lote) quer se forem introduzidos manualmente, por exemplo, na tela de síntese das condições em Preços ou se forem transferidos de um processo externo Como custo. Ltbgt8) A condição é obrigatória Indica se a condição é obrigatória quando o sistema realiza o cálculo de preços usando este procedimento de determinação de preço. Se, por exemplo, você sempre quiser incluir uma condição fiscal (IVA ou imposto sobre vendas) durante a precificação, poderá definir esse indicador para o tipo de condição fiscal apropriado. Ltbgt9) A condição é usada para estatísticas Este indicador faz com que um surchage ou desconto seja definido no documento estatisticamente (isto é, sem alterar o valor). Ltbgt10) ID de impressão da condição linesltbgt Controla a emissão de linhas de condição ao imprimir documentos, como confirmações de pedidos ou faturas. Nas versões anteriores a 4.0, estão disponíveis os seguintes indicadores de impressão: 149. A linha de condição não é impressa 149 X. A linha de condição é impressa no nível de item 149 S. A linha de condição é impressa no bloco de totais A seguinte lógica padrão é estabelecida para estes indicadores de impressão: o Item POS da última linha de condição é determinado com X. O Todas as linhas de condição que contêm um item menor que POS no procedimento de determinação de preço somente são impressas se os indicadores de impressão X ou S estiverem definidos. O Todas as linhas de condição que contêm um item maior que POS no procedimento de determinação de preço, que vêm antes da primeira linha de condição de imposto e que têm uma condição de IVA não estatística, recebem o indicador de impressão S. O mesmo se aplica a linhas de condição que contêm um item maior Do que POS no procedimento de determinação de preços, que vêm após a primeira linha de condições tributárias e uma condição de IVA não estatística ativa. O As linhas de condição que representam um tipo de condição de imposto são sempre impressas em blocos de totais com o indicador de impressão S (definido internamente ou externamente). O As linhas de condição que representam um tipo de condição que não é um tipo de condição de imposto só são impressas com o indicador de impressão S (definido externamente ou internamente) se o valor de condição da linha de condição não for zero. As linhas de condição que não representam um tipo de condição (isto é, subtotais) são impressas somente com o indicador de impressão S ou X (definido externamente ou internamente) se o valor da condição da linha de condição for diferente do valor da condição da linha de condição anterior no preço procedimento. Para fornecer uma melhor visão geral deste processo, 8 mais parâmetros de impressão estão disponíveis a partir da versão 4.0. No entanto, estes indicadores de impressão não podem ser misturados com os três indicadores de impressão anteriores, X e S no procedimento de determinação de preços. Isto significa que os novos indicadores só são levados em consideração se uma linha de não condição no procedimento de precificação contiver indicadores de impressão X ou S. Os novos indicadores de impressão têm as seguintes configurações e a influência correspondente no processamento. O A. no total: geral o B. no total: se valor ltgt zero o C. no total: se valor ltgt valor do predecessor o D. no total: se valor ltgt zero e valor ltgt valor do predecessor o a. No item Geral o b. No item Se valor ltgt zero o c. No item Se valor ltgt valor do antecessor d d. No item If value ltgt zero e value ltgt value of predecessor ltbgt11) Condição subtotalltbgt Controla se e em quais campos são armazenados os montantes de condição ou subtotais (por exemplo, um desconto de cliente ou o custo de um material). Se os mesmos campos forem utilizados para armazenar quantidades de condições diferentes, o sistema totaliza os montantes individuais. Esses montantes de condição ou subtotais são usados ​​como um ponto de partida para cálculos adicionais. Você pode, por exemplo, desejar um subtotal de todos os descontos incluídos na precificação de uma ordem do cliente. Se o requisito for cumprido (SY-SUBRC 0), a determinação da saída também leva em consideração o tipo de saída ou a seqüência de acesso, para a qual o requisito foi especificado. Um requisito possível seria, por exemplo, que uma diferença deve ser feita entre a moeda do documento ea moeda local. Ltbgt13) Fórmula de condição para cálculo alternativo typeltbgt Fórmula alternativa à fórmula no sistema padrão que determina uma condição. Ltbgt14) Fórmula alternativa para a condição base valueltbgt Fórmula para determinar a base da condição como alternativa à norma. Um desconto de cabeçalho absoluto é, por exemplo, distribuído no sistema padrão de acordo com o valor cumulativo dos itens. Se o sistema, no entanto, distribui o desconto de cabeçalho absoluto de acordo com o volume, um desconto de cabeçalho de 30 resulta nos seguintes descontos: ltbgt15) Keyltbgt Chave que identifica diferentes tipos de conta GL. A chave da conta permite que o sistema contabilize valores para certos tipos de conta de receita. Por exemplo, o sistema pode lançar taxas de frete (geradas pela condição de preço de frete) para a conta de receita de frete relevante. Ltbgt16) Chave de conta - provisões de acréscimo Chave que identifica vários tipos de contas GL para provisões ou provisões. Com o auxílio da chave de conta, o sistema pode lançar valores para certos tipos de contas de acumulação. Por exemplo, os acréscimos de descontos que são calculados a partir de condições de preço podem ser lançados na conta correspondente para acréscimos de descontos. Ltbgtreward por favor, se isso é muito útil para youTraditional madeira siding para sua casa será sempre a escolha preferida em qualquer instalação de tapume. No entanto, você precisa do empreiteiro de tapume direito para ajudá-lo a selecionar o melhor revestimento de madeira com a menor quantidade de manutenção de tapume. Existem muitos tipos diferentes de revestimento de madeira criado usando sub-par materiais de madeira. Don8217t deixar seu próximohellip Leia mais Profissional serviços de cobertura e reparação de telhado a preços acessíveis Se o seu ter problemas de vazamento telhado, don8217t esperar para entrar em contato com um contratante de telhadura. Os vazamentos prolongados do telhado parecem inofensivos no início, mas podem se transformar em sérios problemas rápidos. Tendo vazamentos persistentes no telhado pode causar o crescimento do molde, tetos danificados, móveis. Ligue-nos hoje se you8217re in need ofhellip Leia mais Ao tentar reduzir sua conta de heatingcooling home8217s, there8217s não há melhor maneira de economizar dinheiro do que ter novo vinil ou madeira substituição janelas instaladas. Acima de tudo, com o novo desconto de imposto federal de até 1.500 não há razão para não. Ter um deck bonito sempre terá um retorno positivo sobre o valor da sua propriedade. Adicionar uma plataforma é uma maneira barata de expandir seu espaço vivo. O custo médio para construir um baralho é de cerca de 7.000 e rendimentos de um retorno de cerca de 15.000 ao vender sua casa 8211Não a ruim, certo Então considere ter ahellip Leia mais Escolhendo o empreiteiro de tapume direito é crucial em qualquer instalação de tapume. Se está instalando o revestimento do vinil sobre o tapume ou removendo completamente seu revestimento existente para o tapume novo. Ter um contratante de tapume profissional que pode lhe fornecer a melhor solução para a instalação de tapume mais suave irá poupar-lhe um monte de dores de cabeça, tempo e lixo Leia mais O que nossos clientes estão dizendo Muito satisfeito Eu só queria expressar o quão satisfeito com o nosso novo telhado e Calhas sem emenda. Mike e seus trabalhadores são muito agradável e bem educado para ser. I couldnt believe it or Not como rápido que concluída coberturas nossa casa e garagem. Eles deixaram o lugar mais limpo do que quando começaram e protegeram nossos arbustos, plantas como prometido. Fomos tão felizes com a instalação do telhado, que queremos que eles de volta para substituições janela. Obrigado Mike Veja a casa deles / delas: telhando Melrose MA mdash Robert Patricia Quinn, Melrose, MA MBM Construção é rated 5 5 com base em 3 revisões. Encontrar o contratante direito não deve ser doloroso Fazer o melhoramento home direito ou o projeto remodelando pode adicionar o valor real a todo o tipo de repouso, se feito corretamente e eficientemente por um profissional licenciado e segurado. Usando materiais de alta qualidade que são eficientes em termos energéticos, atraentes e, o mais importante, confiáveis, tais como o tapume de vinil de baixa manutenção. Substituições de janelas. Telhados de telhas e decks personalizados irá adicionar valor real. Na maioria dos casos, você pode esperar e retorno imediato sobre o seu investimento depois de ter essas melhorias casa feita. Escolha um empreiteiro que vai começar o trabalho feito, orientá-lo através de cada passo do projeto do início ao fim, sem quaisquer extras escondidos. Nossos serviços da melhoria home deram-nos uma borda acima de outras companhias home da remodelação. Sendo uma das áreas principais prestadores de serviços em tapume, coberturas, janelas de substituição e adições de sala. Dá-nos grande poder de compra através de nossos fornecedores e em troca, pode passar ao longo da poupança para você Então, por que nos escolher como sua casa remodelação contratante Nós ouvimos as suas necessidades. Nós não usamos alta pressão vendas, ou tentar vender algo que você não precisa ou quer. A comunicação é a chave para qualquer tipo de projeto de remodelação e queremos que seu projeto tenha o melhor resultado possível. Você obterá um projeto detalhado tempo estimado de conclusão - sem dores de cabeça Você também terá uma das melhores garantias no negócio de melhoria home, se você precisar usá-lo. Que tipo de serviços de melhoria Home Você está procurando Escolha um contratante de telhadura que vai trabalhar em seu melhor interesse e não em quanto lucro ele pode fazer por cantos de corte. Como empreiteiros de telhados, acreditamos em usar as melhores telhas de telhado e underlayment para dar aos nossos clientes a paz de espírito. Para obter mais informações sobre serviços de coberturas, visite: Coberturas comerciais ou telhados residenciais Não todos os revestimentos de vinil e madeira são os mesmos. Escolha um contratante de tapume profissional que irá ajudá-lo a entender que tipo de revestimento de vinil para evitar, eo que vai lhe dar o melhor bang para seu buck a longo prazo. De uma plataforma convencional de pressão, mahagony deck, ou um deck composto - weve você coberto. Leia mais sobre Decks e Porches Deck buildersUm dos conceitos mais difíceis de explicar ao introduzir novas pessoas para o Business Objects é o contexto. Agora eu imagino que os leitores de blogs que estiveram trabalhando com as ferramentas por um tempo começaram a balançar a cabeça em concordância, apenas para parar e dizer, 8220Ei, espere um segundo, é Dave falando sobre contextos de universo ou contexto de cálculo de relatórios8221 E a resposta é, claro que sim. Ambos os conceitos podem ser bastante complicados e levar um tempo para compreender completamente. Desde que eu já escrevi um número de posts sobre contextos de universo eu pensei que era hora de voltar minha atenção para a técnica de relatório de contextos de cálculo. Observe que esse conceito é usado no Desktop Intelligence e no Web Intelligence, mas não no Crystal. Este post destina-se a ser apenas uma visão geral. Tenho planos para um post detalhado sobre cada um dos vários operadores de contexto onde vou entrar em muito mais profundidade. Para este post meu objetivo é introduzir o conceito e fornecer algumas definições básicas. Introdução ao contexto de cálculo O contexto de cálculo padrão é definido pelas dimensões que participam de um bloco de relatório. É esta característica que torna possível a natureza dinâmica das medidas. Quando as dimensões são removidas ou adicionadas a um bloco, o contexto muda e os valores das medidas também mudam. Isso é controlado pela função de projeção definida em cada medida pelo designer do universo. No entanto, um escritor de relatório às vezes quer que uma medida seja fixada em um valor específico. As porcentagens são um exemplo muito simples. Para calcular uma porcentagem de contribuição, preciso dividir cada valor individual pelo total geral. Para fazer isso, eu preciso saber como gerar o total geral em qualquer lugar que eu quero. A fim de fazer isso . Eu preciso entender como usar os vários operadores de contexto de cálculo. Operadores de Contexto Há um conjunto de operadores de contexto simples (mas poderoso) que eu posso escolher. Pretendo definir brevemente cada um neste post do blog e depois mergulhar em mais detalhes em postagens futuras. Como mencionei quando comecei, o contexto padrão para uma medida é baseado nos valores de dimensão presentes na estrutura do bloco. Posso alterar quais dessas dimensões influenciam o cálculo usando um dos três operadores de contexto a seguir. In é usado para especificar exatamente quais dimensões incluir em um contexto. Outras dimensões no bloco são ignoradas. Adicionar remover elementos do bloco não afeta esse cálculo a menos que uma dimensão removida tenha sido especificada no contexto. Nesse caso, um erro MULTIVALUE é exibido. ForEach é usado para incluir uma dimensão em um contexto. O contexto de cálculo ainda é afetado por outros valores no bloco. ForAll é usado para excluir uma dimensão de um contexto. Outras dimensões do bloco ainda serão consideradas. Adicionar ou remover valores de um bloco pode alterar o valor, mas sempre ignorará os itens ForAll. Os operadores listados acima requerem uma ou mais dimensões como parte de sua sintaxe. No entanto, o contexto de cálculo pode ser especificado por mais do que um conjunto de valores de dimensão. Há uma série de palavras-chave de estrutura de relatório que podem ser usadas também. No relatório define o contexto no relatório ou 8220grand total8221 nível. Qualquer fórmula com essas palavras-chave para o contexto retornará um total geral. Observe que o total pode ainda ser afetado por filtros de relatório. No bloco define o contexto para cada seção de bloco. Por anos eu tenho esperado por esta configuração para ser renomeado para refletir como ele realmente funciona, mas ele não tem. Suponho que é para compatibilidade com versões anteriores. Se houver apenas um bloco em um relatório, em seguida, 8220In Block8221 e 8220In Report8221 vão ser o mesmo. Mas quando um bloco é dividido em seções, então esse contexto gerará um total para cada valor de seção. Por essa razão, eu afirmo que um nome melhor poderia ter sido 8220In Section8221 vez, mas enquanto eu sei o que faz a palavra específica realmente não importa. Em Corpo é o contexto padrão padrão para cada linha de dados. Com o Desktop Intelligence temos a opção de Em CurrentPage que pode ser bastante útil e, infelizmente, ainda não está disponível no Web Intelligence. Eu provavelmente don8217t tem que explicar como o 8220CurrentPage8221 total é derivado. Finalmente, essas palavras-chave podem aparecer em vários lugares em uma fórmula. As mais comuns são as configurações de contexto 8220input8221 e 8220output8221, mas certas funções (como RunningSum (), por exemplo) também têm um contexto 8220reset8221. Contexto de entrada é usado para determinar os valores de entrada para a fórmula. O contexto de saída é usado para determinar o escopo de saída da fórmula. Reset context é usado para determinar quando uma função em execução começa em zero. As dimensões referenciadas no contexto de entrada não precisam aparecer no bloco. As dimensões de saída e reset devem aparecer no bloco para funcionar corretamente. Para muitos cálculos, o contexto de entrada padrão funciona bem. Vou mostrar um exemplo onde é essencial para entender o contexto de entrada mais tarde. Por agora, gostaria de passar a um exemplo simples. Exemplo de Contexto de Cálculo Simples É difícil compreender completamente algumas das sutilezas do contexto de cálculo sem bons exemplos. Para este post vou fornecer um exemplo simples, mas comum que eu mencionei anteriormente: percentagem de contribuição. Vou começar com um bloco simples com uma dimensão (resort), uma medida (receita) e um total geral como mostrado aqui. Este bloco já tem um total nele. Se esta fosse uma planilha comum, eu poderia fazer referência ao valor total usando um endereço rowcolumn, mas isso não funciona na Web Intelligence. Isso significa que eu tenho que usar outra técnica para gerar o total geral. Eu mencionei a solução before8230 tudo o que tenho a fazer é criar uma fórmula simples que se parece com isto: Here8217s a fórmula novamente: Receita Receita Em Relatório Lembre-se de que o contexto do relatório projeta a medida até o total total do relatório. Usando esse operador de contexto de cálculo no denominador de minha divisão, asseguro que eu sempre estarei dividindo pelo total geral nesta fórmula. Os resultados What8217s Next Este post apenas arranhou a superfície da pergunta contexto de cálculo. Ele forneceu algumas breves definições e um exemplo simples. Eu tenho vários outros lugares planejados que vão mergulhar em detalhes muito maiores sobre este assunto muitas vezes confuso. Primeiro eu planejo falar mais sobre In versus ForEach versus ForAll e como eles são diferentes. Em seguida, planejo cobrir o contexto de entrada versus saída e quando cada um deve ser usado. Como eu escrevo este post nenhum desses dois são muito mais do que um esboço para agora, então eu don8217t tem uma data de publicação estimada. Mas eles serão publicados. Eventualmente. 125 Responses to 8220Calculation Context Parte I: Overview8221 Obrigado por este excelente post, estou realmente ansioso para futuras postagens sobre este tópico. Os contextos de cálculo são muitas vezes mal compreendidos e adivinhados, mesmo depois de anos de experiência em usá-los. Esperemos que isso irá aumentar a compreensão de todos os usuários webi e deski. Olá Dave. Se você fosse um DJ, diria que ama o show. Cada vez que eu preciso usar contextos de cálculo eu tenho que voltar aos primeiros princípios e trabalhar com exemplos para ajudar a minha compreensão. Portanto, posts mais aprofundados serão grandes. De qualquer forma, no seu exemplo acima, você não tem função agregada e não há colchetes. Minha maneira simples de lembrar a sintaxe é que os contextos de entrada estejam entre parênteses, por ex. Soma (medida no contexto) e os contextos de saída estão fora dos colchetes, por exemplo, soma (medida) no contexto. Com isso em mente, é o RELATÓRIO IN no denominador tecnicamente o contexto de entrada ou saída Olá Dave, Obrigado por escolher os contextos de Cálculo como assunto a esta postagem. Eu simplesmente não consigo parar de mencionar que me perguntaram a diferença entre Para Cada E Para Todos Na minha entrevista anterior. I respondeu, mas vai ver o quanto isso é certo, lendo o seu próximo post8230 Estou procurando algumas coisas em soluções Integra, mas couldn8217t encontrá-los, Quoram está surgindo. Eu entendo que Integra fundiu com Quoram, mas onde posso encontrar os materiais. Oi, Grantie, obrigado pelo seu comentário. A verdade é que você não precisa usar funções agregadas para a fórmula se a função de projeção for definida corretamente. No caso acima deixei-o para fora para a simplicidade. Contexto de entrada é sempre dentro de parênteses, para responder a sua pergunta o 8220In Report8221 é o contexto de saída. Jus, a empresa Integra Solutions eo site associado já não existe. Quando eu fui para obter um link para a página de downloads no site Quorum, parece que eles redesenharam o site desde a última vez que olhei. Eu procurei, e há arquivos pdf ainda disponíveis, mas eles don8217t parecem ser indexados em uma página em qualquer lugar. Eu não sei o que sugerir, além de tentar usar sua página de contato. Existe um item específico que você estava procurando Se it8217s algo que eu criei it8217s possível que eu poderia postá-lo aqui no meu blog para referência. Olá Dave. Sim, eu entendo a projeção e isso é o que eu estava conseguindo, suponho. Sem ele estar explicitamente lá, eu nunca sei se a função SUM (como definido pela projeção de seu objeto) iria englobar o Relatório dentro do contexto de entrada ou saída i Então eu sempre acabo explicitamente colocando a função agregada apenas para que eu possa entender Se I8217m referente ao contexto de Entrada ou Saída. Desculpe drivvle em. Sei que neste exemplo não é aqui nem lá, mas é algo que me incomodou e nunca recebi uma resposta. Então, a partir do que você está dizendo seu relatório de receita em é o mesmo que a soma (receita) no relatório. Meu Deus. Veja por que eu luto. E I8217m tentando obter a minha cabeça em torno de um problema armadilha fã ao mesmo tempo Grande site. Obrigado por compartilhar seus cérebros. Grantie, em qualquer linha de um bloco, os valores de contexto de entrada e saída padrão são sempre 8220In Body8221. Se um valor está em um rodapé de uma quebra, o contexto de saída é baseado na estrutura da quebra. Para tornar as coisas mais confusas quando você faz uma projeção Sum (), a entrada raramente faz a diferença. Suponha que você tenha valores de linha detalhados de 1, 2, 3, 4 e 5. Suponha que 1, 2 e 3 são valores detalhados para 8220A8221 e 4 e 5 pertencem a B, algo como isto: Se eu fizer uma pausa em O valor de dimensão, eu recebo isto: Se eu quiser um total de relatório, não importa se meu contexto de entrada é o valor de dimensão (1 2 3 4 5) ou o valor de ruptura (6 9) como ambos os resultados ainda são 15. Coisas Mais interessantes quando médias ou outras operações são utilizadas embora. Oi Dave, eu sempre tenho que verificar com as notas quando eu tenho que lidar com os contextos de entrada e saída. Você poderia me dizer a diferença entre os contextos de entrada e saída. Um é para entrada, eo outro é para saída. Em toda a seriedade, esse é um tópico para a próxima postagem no blog. It8217s um pouco muito para cobrir como um comentário, então fique atento para more8230 Oi Dave, eu preciso usar o contexto de cálculo no meu relatório. Eu preciso dos dados em um relatório de quatro diferentes universos que estão em grainhierarchy diferentes .. seria ótimo se o seu poderia postar mais detalhes com exemplos sobre In, For Each, For All, no relatório, no Bloco e no corpo contextos de cálculo..thanks de antecedência .. Olá, Yogesh, eu tenho planos para escrever mais sobre ForEach e ForAll e assim por diante. Eu tenho um post no status do rascunho agora que eu preciso terminar. Espero que você pode ser paciente como às vezes as coisas se movem devagar. Você é sempre bom com seu borne e me ajuda muito. Eu adoraria ver mais postagem no contexto de cálculo. Uma questão particular que eu tenho é, podemos usar dimensões que não estão lá no bloco, mas disponível na consulta para alterar o cálculo da medida usando o contexto de cálculo estendido mais se pudermos como devemos ter cuidado quando há várias consultas (dataproviders ). Oi, Mathew, eu tenho mais posts em 8220draft mode8221 sobre este assunto. Espero obter alguns deles concluída em breve. Para responder a sua pergunta, qualquer dimensão que participe do contexto de saída deve estar no bloco. Uma dimensão que participa do contexto de entrada não precisa estar presente. Olá, Dave. Obrigado pelo post. I8217m encontrá-lo realmente útil. Eu encontrei um problema, entretanto, que eu acredito requer o uso do contexto do cálculo que I8217ve wracking meu cérebro sobre para a semana passada ou assim sem sorte. Imagine quebrar a receita dos clientes, mas cada cliente poderia viver em vários estados. O universo é construído com um contexto que contém nossos clientes e medidas, e um segundo contexto que une os clientes aos estados. Quando eu colocá-los em um bloco juntos, tudo funciona bem (imagine a primeira coluna é o estado, segundo é cliente, e terceiro é a receita): AX 10 AY 5 AZ 12 por 5 CZ 12 total: 27 (a soma dos três Clientes) Agora, se eu remover o cliente do bloco, eu recebo: A 27 (que é correto) B 27 (gostaríamos que este seja 5) C 27 (gostaríamos que este seja 12) t: 27 Do mesmo modo, Se eu colocar quebras nos estados, gostaria de obter: AX 10 AY 5 AZ 12 total: 27 CZ 12 total: 27 I8217ve tentou cada combinação se entrada e saída contextos de cálculo que eu poderia pensar, e invariavelmente obter os resultados acima. Qualquer pensamento BTW, se faz a diferença, we8217re no BOE XI r2 (espero que se deslocam para 3.1 mais tarde este ano). Olá, Darius, e bem-vindo. O que você descreveu é o que eu chamo de provedores de dados não balanceados8221, pois você tem valores de dimensão em diferentes níveis. Estado está em um nível superior ao cliente e você está usando o cliente para reunir os dois conjuntos de dados. Eu acho que se você ler o post seguinte você verá uma descrição exata do seu problema junto com uma solução. Agora para a má notícia: A função ForceMerge () não existe até XI 3.0. Se você estiver trabalhando na Web Intelligence, então você está fora de sorte até que você atualize. Se você estiver usando o Desktop Intelligence, então você pode tentar usar a função MultiCube () em uma solução semelhante. Obrigado. Pelo que eu li, isso parece exatamente o que eu estou procurando. O único soluço é tudo no meu exemplo é proveniente de um único fornecedor de dados (embora com vários contextos), mas I8217ll experimentá-lo quando nos mudarmos para o XI 3.0. Em teoria, acho que vai fazer o truque. Felizmente meus clientes ainda não perguntaram sobre isso, e eu não antecipo eles tentando construir um relatório usando os dados que causariam esse problema. I8217m apenas tentando ficar um passo à frente deles8230 Tenho dados abaixo Agora no meu relatório eu quero abaixo dimensões e contagem de RiskIDs único no nível Entidade. como abaixo. Ou seja, eu quero estender a função Count () para incluir Entity no contexto de entrada. Região País Contagem (RiskIDs) Ásia Índia 5 Por favor, deixe-me saber como escrever a fórmula acima. Obrigado, Poonam N. Oi, e obrigado pela sua pergunta. Pelo que eu posso ver, este problema não requer contexto. Basta criar uma nova variável que combine Entidade com ID de risco e, em seguida, contar os resultados. Enquanto a fusão de um nome de fornecedor apenas um valor é duplicado. Exemplo: fornecedor contém hfc, uhc e aetna da tabela A. revendedor contém uhc aetna e cobra quando a fusão eu tenho hfc uhc aetna aetna cobra aetna está se repetindo duas vezes na dimensão mesclada. pode me ajudar a resolver isso. Oi, isso realmente não é um problema de contexto. Como mencionado em outro lugar. Este blog não pretende ser uma fonte de apoio pessoal. Você pode querer experimentar o BOB ou entrar em contato com o suporte técnico com suas perguntas se elas não estiverem relacionadas a um post aqui. Obrigado. Estávamos encontrando problemas com cálculo de idade em um relatório perfurado XI R2 SP4. O total que estávamos dividindo por sempre foi filtrado. XI 3 recurso NOFILTER (broca de objeto) funciona no SP4 8211 esta 8216drill option8217 é indocumentado em SP4 ajuda 8211 assim anteriormente nós tinha resolvido para duas fontes de dados, mas isso é muito melhor. É o contexto do cálculo é usado somente para a agregação Se não o que são funções nós podemos usar os pls dão a definição desobstruída para o contexto do cálculo eu ensinei cursos da Web Intelligence da semana passada e entre as coisas as mais importantes eu penso são contextos inputoutput e dados da trilha (e as fórmulas novas) . Gostaria que tivéssemos a capacidade em Web Intelligence para avaliar uma fórmula em seus contextos (como poderíamos com DesktopIntelligence antigo). Eu realmente aprecio o seu estilo de explicar os conceitos. Este blog realmente me ajudou muito. Cab você, por favor, jogue mais luz sobre os contextos de entrada e saída Obrigado amplo Atenciosamente, Girish Jawale Eu estou tentando criar o contexto da fórmula, eu tenho 3 medidas para vir acima com. Medida 1 8212 PY Total Gastar medida 2 8212 Cy Total Gastar medida 3 8212-CY Total Gastar Total (até o final do mês anterior) Eu fui um ble para criar os primeiros 2, o meu problema é obter o 3 um criado. Obrigado pela ajuda. Oi, Sunil, você não tem um problema de contexto em seu cenário. Parece que você precisa de um cálculo que inclui tudo, exceto para o mês atual. Eu iria experimentar com o código que se parece com isso: Soma (gastar) - Soma (gastar) Onde (mês Mês atual) Isso vai te dar um total geral e, em seguida, 8220back out8221 o montante para o mês atual, deixando um total ano atual para cima Ao final do mês anterior. Isso é apenas uma idéia e não a sintaxe real, como eu tenho certeza que você percebe. Um resumo agradável, claro e conciso dos operadores de contexto. Minhas perguntas. Refere-se a cálculos utilizando pormenores das dimensões, e. QryDatadim userFiledim Data Área Zona GeographicId (detalhe da cidade) Site Site 82128212821282128212821282128212821282128211 NumCalls DenCalls Dois cálculos necessários são Date e GeographicID. No entanto, o cálculo de Data é dependente de GeographicID como dois sites compartilham um GeographicID comum. por exemplo. GoodCalls if (numCallsdenCalls) IN geographicID lt 2 then numCalls Enquanto o exemplo acima calcula corretamente, os valores não são transferidos corretamente para cima para o nível de data. Re-afixando as dimensões8230 qryDatadim8211userFiledim Date821282128211none none821282128211Area Zone821282128211Zone none821282128211GeographicId (detalhe da cidade) Site821282128211Site 821282128212821282128212 numCalls8212-none denCalls8212-none NumCalls DenCalls Eu tenho uma situação específica em que você pode ser capaz de me guiar. Eu tenho um relatório webi onde eu tenho quebras e seção definida em certas colunas. Como parte do cálculo, sou obrigado a fazer média em determinadas colunas e produzir a média do relatório por ruptura, seção e média geral. Agora, quando eu aplicar a função de média dentro da seção na coluna de quebra e coluna de seção as médias se torna ser right8230 .. mas quando eu preciso exibir grande média de todos os valores de coluna fora da seção em outro bloco 8230. o valor só fica somado Up8230.no cálculo médio tem lugar8230as recomendado Eu tentei aplicar operadores de contexto No relatório, na seção 82308230but para nenhum sucesso 8230.could você me avise se houver uma maneira de conseguir isso. Oi, Obrigado pelo tópico e informações úteis sobre o contexto, estou tendo um requisito simples que precisa de calcular o total ouside a seção. Digamos que eu tenho uma seção sobre o peoduct e dentro da seção há wile subproduto contagem e os subprodutos serão dinâmicos com base nos valores de prompt. Uma vez que eles são gerados eu preciso calucated a contagem de produto fora lado a seção, eu sou capaz de obter o cout dentro da seção, mas eu não sou capaz de obter o cout ouside a seção, você tem alguma idea8217s nesta questão. Darsh, você pode tentar fazer uma contagem de soma em vez de usar a função média Oi Dave. Eu aprecio frequentemente bater em seu local sempre que I8217m que googling longitudinalmente para algumas perguntas do BO. Você está planejando escrever seu próximo blog sobre forEach e forAll soon Estes tópicos são como você apontou bastante difícil de explicar, e também se familiarizar. Atenciosamente Ingrid Dave 8211 o que posso dizer 8230 .. obrigado Oi Dave, Obrigado por este escrever. Nunca fui com as mãos vazias depois de ler o seu blog. Sempre obter uma resposta aqui :) Obrigado novamente Reenviando parece algumas das fórmulas didn8217t publicado correto .. Oi Dave, tenho hierarquia Divisão-gtMarket-gtCenter. Eu criei a seção na dimensão do mercado com vendas como a medida. Eu queria ver as vendas no nível de divisão não para cada mercado, mesmo que seja seccionado pelo mercado. Eu tentei usar contextos de entrada e saída ainda não funciona. Eu tentei usar Sales ForEach Divisão Recebo multivalue erro, Se eu usar Max (Vendas em Divisão) Eu recebo máximo de vendas de todas as divisões. Qualquer ajuda sobre quais contextos de cálculo ou sintaxe usar seria apreciada. Você pode por favor explicar em detalhes sobre o assunto que poonam postou 8220Comment por Poonam N 15 de abril de 2010 às 6:40 am 8220. Eu queria todas as dimesions no relatório e quero 5 a ser exibido no total. Você pode explicar como fazê-lo. Crie uma variável que combine Risk ID e Entity e conte os resultados exclusivos. Você iria obter Vendas-1001 Vendas-1001 Vendas-1002 Marketing-1001 Marketing-1001 Marketing-1003 Educação-1001 Educação-1001 Quando você conta os valores únicos, você estará contando isso: Vendas-1001 Vendas-1002 Marketing-1001 Marketing -1003 Educação-1001 Isso vai te 5. Oi Dave, Você explicou claramente. Gostaria de saber mais sobre BO. Desde que eu sou novo para esta ferramenta poderia por favor me aconselhar alguns passos para começar com BO. Ao ler seus blogs sempre dá alguma idéia sobre BO. Muito obrigado Oi Dave. Só queria estender a discussão ao ranking. I8217ve usou com sucesso contextos de cálculo e classificação para mostrar os clientes x superiores, com os clientes restantes agrupados em 8220Others8221. Mas quando eu coloco uma pausa nesta dimensão, a classificação é redefinida dentro da pausa, o que significa que cada cliente está agora classificado como 1. Eu posso ver uma maneira de dizer minhas variáveis ​​para ignorar a reposição no intervalo. Você já quebrou este onegt Este blog me ajudou muito na compreensão dos conceitos básicos de Cálculo Contextos. Obrigado, Dave. Eu queria que você tivesse publicado mais alguns blogs sobre este tema que estavam em drafts8230 Obrigado por este post e blog em geral. Ele realmente me ajudou com alguns conceitos complicados que don8217t parecia ser coberto em livros (especialmente o post sobre fornecedores de dados desequilibrados). Depois de ler isso eu parecia estar usando contextos bem para a maioria das coisas, mas ter atingido uma parede de tijolos quando usando contagens, em algumas circunstâncias. Em particular, usando CountAll em um objeto dimnesion. Eu escrevi o problema no BOB: Se você tem algum comentário sobre esse assunto, seria ótimo, mas em geral eu adoraria ver a parte 2 deste post. A 2ª parte deste post foi publicada ainda I8217m ansiosa por isso. Aguardo ansiosamente o seu próximo post sobre este tópico. Espero que você leve alguns para escrever sobre, ForALL, ForEach contextos em breve esperando para o próximo post Oi Dave, eu li seus blogs com muita freqüência. Eles são muito informativo e fácil de entender. A maneira como você explica as coisas complexas, realmente tornar a nossa vida muito fácil. Ansiosamente esperando por seus próximos posts em Contextos de Cálculo. Eu reiniciei para ler todas as suas postagens no blog desde que acordar. I should complete, infact grasp all the BO things effectively. I8217ve recently published a few reports using the ForceMerge() function which works great in the column. The column I have this applied to has a filter on the first report and a different filter on the second report. The third report combines the two. The third report total is correct, but the first and second report column totals are not 8230 it displays the whole report total for the ForceMerge() field. What am I missing I tried: If(Provider Type Group 8220Physician8221) Then Sum(fmRTS) Else 0 but this still gives the whole report total, not just the total where 8216Physician8217. Thoughts Any help is appreciated. Your blogs are very helpful and making me understand the concepts well. This blog is also well written. I am eagerly waiting for your detailed blogs on for each and for all. Hi Dave, I8217m in desperate need of your expertise. This multivalue has me stumped. I have a report where I am calculating the amount of time that it takes to resolve a service request, in weeks. So I have a variable that calculates weeks. the example is for those that take 0-4 weeks. Variable name Count0-4 IfWeekslt5 Then Count(CompletedInstallTurnaround. SR Number) I then also have a variable that counts how many records were in that count. Variable name Total0-4 RunningSum(Count0-4) This gives me a correct total of how many service requests took between 0-4 weeks. I039m trying to display the variable Total0-4 on a second report and I get MULTIVALUE I have then tried to use the max function and the last function I039ve also tried adding quotin Reportquot to the variable above. I still get the error MULTIVALUE on each one of them. How to I get the total from the first query to display on the second query Hi, Karen, your issue is probably because you8217re referencing a dimension object in an 8220If8221 statement. If that dimension object 8211 Weeks in your case 8211 is not in the block, then the measures roll up (project) beyond the level of Weeks and therefore are no longer in the same calculation context. There are too many weeks, thus you get a MULTIVALUE error. You might try creating a couple of variables to address this. First, create a flag variable with a syntax something like this: If Weeks lt 5 Then 1 else 0 Then use this flag in the 8220Where8221 clause of another variable, like this: Count(. ) Where (Flag 1) That8217s not the exact code, but you might see where I8217m going. By using the Where clause you can reference something that isn8217t in the block, which sometimes allows you to work around a multiple value error. Dave, that worked perfect. I8217m so happy I found your site. I8217ve found so much helpful information. I had resorted to putting the calculations in the universe which is not what I wanted to do. I can pull those back out now and do it the proper way. Hi Dave, As an ex BOBJ employee and BOBJ trainer I do find your explanations very easy to understand 8211 and although a lot of what you have here i know, as you say 8211 there is always something Thank you for your sharing Hi sir Dave Rathbun can you please demonstrate how to create dynamic measures i want to calculate difference between revenue of any two year from available 3years with only 1 measure and display the difference in the other column. Thanks in advance for giving your precious time. Hi, this isn8217t really a calculation context issue, and I have seen you have posted the same question on BOB which is probably the best place. Obrigado. Hi sir That isn8217t me. i saw that post but did not work. please help. waiting for your reply. As I said, it8217s not a calculation context issue, and therefore isn8217t really appropriate to address in comments on this blog post. If you can provide additional details in the topic listed, what you have tried, how your situation is different, and what you ultimately need, I suspect you8217ll get better results. Obrigado. Hi Dave, I always find that your posts improve my knowledge and often my product and this post, about calculation contexts is one that I8217ve found most useful. However I have a continuing problem with contexts for median and other percentile functions. I am easily able to test the results by pushing the source out to excel, sorting and then finding the middle row so I know what I should see and can compare with what I get. When I use median function the results for each row in a block are correct but when I try to get the median for the whole block in a table footer the result has never been correct. What context should I use to fix my mistakes Thanks in advance. I have never experimented with the median function that much, and I don8217t think I8217ve ever tried to use it with a context operator. Normally the footer context is whatever the break (or breaks, if multiple) are. If I have a block with Resort, Year, and Revenue, and I break on Resort, then the footer context is In (Resort) as you probably know. Dave, you come highly recommended by members of the Bus Obj Boards. I desperately need your expertise. I need to create a report that is a top 10 ranking (which has been completed) but the report is too large to export to Excel or CSV. The crosstab report contains items on the left and individual store numbers across the top (each store number also belongs to a 8220group8221). The data is the number of cases each store has sold since the beginning of the year. My real problem is that I can get the report reduced down to an exportable (manageable) amount of data by using a filter that will limit the results for that tab to show only the results for a particular 8220group8221 of stores, but each time I use the filter, the order re-sorts based on the sales of that 8220group8221 of stores selected instead of using the grand total. I need to measure the items against the grand total because we are trying to show distribution voids. I can not get it to reflect the grand total, only the individual group total. Any help on this would be appreciated. Hey Dave , If I want to calculate the grand total of revenue for three years where there is section break in a year and break in a state how can I do it A grand total can always be generated using the context 8220In Report8221 in the formula. Glenn, you can use the NoFilter() function as part of the formula to get the grand total even after you have applied filters to the report. Awaiting for the sequel of 8220Calculation Context Part I: Overview8221 Hi Dave, I8217m triying to implement a margin of error and raise a flag if that margin is pass. I implemented this within Webi but the user will want to filter by flag ( Y N). I created a variable that will hold that flag but when I use it as a filter, it will only display one value Y, not N When the user selects that only value, Y, there8217s no data to display. I think Im missing something but cant figure what it is8230Any advise will be greatly appreciated. (Thanks) Can you post a few details about the data and the formulas you are using I suspect that what is happening is your numbers 8211 without context 8211 are being rolled up. The 8220Y8221 is then being calculated at the top 8220grand total8221 level, resulting in a single value. More details would help clarify your question. X amp Y are columns that sum up values. Those columns are in a table with the flag variable. Flag variable. If(Abs(x 8211 y) gt Abs(Margin of Error) Then 8220Y8221 Else 8220N8221 The above variable is working fine but when I set the Flag variable as a filter in the report. It would only show Y and when selected, no data is displayed. I hope this helped. Data exaple: Error Margin: 0.03 X Y F 1.1 1.2 N 1.3 1.9 Y Any thoughts Webi8217s filters cant use contexts even if you set them as dimension. Hi Dave, I have a report which will display top five projects and their revenue percentage. Percentage is of a project revenue is calculated as project revenueAll projects revs. Here i m not able get the All project revenue in each record to calculate percentage. Could you pls suggest. Sample data: project rev percentage 1 500 (5002000)10025 2 400 (4002000)10020 3 300 8230.. 4 200 82308230 5 100 82308230 Total of top five 1500 Total of all projects 2000 (i calculate using formula: sum(nofilter(projrev))) thanks in advance Satya You need an 8220In Report8221 somewhere to get the overall total. Also some times I have to play with the NoFilter() function and decide if it works better as Sum(NoFilter()) or NoFilter(Sum()) instead. Satya, You can use this formula 8220Measure(Sum(Measure) In Report)8221 Hi Dave, I would like to exclude a particular object in the context (file) and than take the sum with a different object as output (cons) and than sum again on file level. I8217ve tried every combination of ForAll and ForEach and even tried something with In, but it doesn8217t seem to work. I8217ve also considered using 2 different queries such that the cost is gathered on cons-level, but when using forcemerge() the cost of a consignment is only used for one file that the cons is on. I hope you understand my question. Below an overview of the data I have in my report and the results I would like to retrieve. Required summary overview: Could you please help me with this problem Or is this not possible I thought I followed your question, but then when I looked at your sample data I got confused again. How many data providers do you currently have Is your final output going to have 3 rows (as in your second example) or 5 (as in the first) Because based on the 3 rows, it seems like you can simply create a block with 8220file8221 and 8220Cons costs8221 and based on the 5 rows of raw data you showed, the cost should naturally roll up when you remove the 8220Cons8221 object. Or is this the final output you8217re looking for If what you8217re looking for is what you posted, I created your sample data in a spreadsheet, created a Webi report, and generated this output: My formula was this: Sum(Cost ForAll(File)) In (Cons) Hi Dave, Thanks for your quick response. I would like to solve my problem without using an extra data provider. Meaning that all information is available in one data provider. Currently, my raw data looks like: Cons file Cost 1 A 10 2 B 20 3 B 30 1 B 5 2 C 25 After creating a variable called 8220Cons cost8221 I can created the following table (same as raw data but including the new created variable. This variable calculates the total cost for each consignment. Cons file Cost Cons cost 1 A 10 15 2 B 20 45 3 B 30 30 1 B 5 15 2 C 25 45 Now, what I would like to do is create a block that provides me the below overview. This overview should sum all Cons Costs of each Cons on a particular file. For file B: Cost(cons 1)Cost(cons 2)cost(cons 3)15453090. file Cons costs A 15 B 90 C 45 What I get as output is the below block which is not what I need. For some reason I get the total cost if I remove the cons Object. file Cons costs A 90 B 90 C 90 I hope this clearifies my question. You get that because the 8220file8221 value is no longer available, which apparently in this case makes the 8220In File8221 act the same as 8220In Report8221 and you get the overall total. B asically it works this way: anything in the input context does not have to be in the block. Anything in the output context has to be in the block. You can8217t sum by 8220file8221 and use it to drive a calculation unless it8217s in the output block in some fashion. I also tried to create a break and fold the results, but the break total doesn8217t work because of the MULTIVALUE error that occurs. Maarten, i think your SQL should be as below to get the desired result. select B. file, sum(A. CONSCOST) from (select cons, sum(COST) as CONSCOST from TableA group by CONS ) A, TableA B where A. consB. cons group by B. file TableA has the data as below I am not sure whether we can achieve that at report level. Thanks a lot for this page 8211 I8217ve learnt a lot from it. There is something I8217m currently stuck on though and was hoping you might be able to give me a pointer: I have a report sectioned by a date dimension, but I need to have all the dates of the dimension available in each section. I8217ve tried nofilter(date) but this doesn8217t help and 8216in report8217 gives me a multivalue error. Is there a context operator that could help me with this please Hi, Rob, that doesn8217t sound like a context problem because you8217re missing dimension values rather than adjusting how measures work. There are a couple of other blog posts here that talk about making up data, perhaps one of those will help. I am currently using webi 4.0. I have two reports in one file. First one contains the overall sales of all regions and the second one is broken down by region. In the region report I need to calculate some expenses where i need to find the ratio by taking the region expenses divide by overall expenses, my measure give me UNAVAILABLE error.. This is the how my measure roughly look like : (ifExpenses1 Then Region Expenses earned profit) (ifExpenses1 Then overall Expenses earned profit) in report I used flag to avoid Multivalue error Appreciate your assistance. Hi Judy, to understand the problem clearly could you please provide a small data set and the desired result you wish to achieve Hi, I need some ideas to accomplish something. I am working on a table that needs to show the Top 10 Incidents by Configuration Item (not complicated), where I am stuck is in the column that needs to show the percentage, as I need it to show the percentage based on the total Incidents and not on the ones shown in the table: CI01 116 11.42 CI02 86 8.46 CI03 59 5.81 CI04 47 4.63 CI05 47 4.63 CI06 47 4.63 CI07 43 4.23 CI08 38 3.74 CI09 35 3.44 CI10 29 2.85 The total Incidents for this example is 1,016 and if I show the table with all data, all percentages are calculated properly. When I add a ranking or somehow filter the table, the percentages are calculated based on the information shown by the table, like this, which represents the percentage of the Top 10 only: CI01 116 21.21 CI02 86 15.72 CI03 59 10.79 CI04 47 8.59 CI05 47 8.59 CI06 47 8.59 CI07 43 7.86 CI08 38 6.95 CI09 35 6.40 CI10 29 5.30 The percentage is being calculated by this formula: CR - Ticket Count(Sum(CR - Ticket Count) In Report) CR 8211 Ticket Count is constant 822018243 sent by the database for each ticket and is defined as SUM measure in the Universe. Any ideas are appreciated. Muito obrigado. A rank or filter are two different ways that data can be reduced. If you want the overall total ignoring all filters then the NoFilter() function does that for you. A good initial guess might be: CR - Ticket CountNoFilter((Sum(CR - Ticket Count) In Report)) Dave Rathbun, you are a genius. I did not know that one of the 8220NoFilter()8221. I got exactly what I was looking for. Obrigado. Hi Dave, I need to see sum of all rows for one of my measure column even when a dynamic report level filter is applied in webi. i tried using noFilter() function but that is not working. You8217ll have to provide more details than 8220not working8221 in order to get any useful replies. Thanks a ton for the post. It really helped me accomplish a very detailed level report. I am hoping you could suggest a solution for one detail of my report. I have a Region - Location 8211 Status 8211 of applications table in my report. I have a Horizontal stacked Chart(x-axis Location, Y-axis of the count) by status. The problem is the is being calculated for the entire report or any value given through input control whereas I want a for each Location by Status. Example: location Bay Area I want my to be count for each statuscount of Bay Area. Whereas I get to be Count of each Status for Bay Area for the entire report or any filter I select which changes constantly. Is there a way I missed where the calculation context can be applied to the Charts Thanks much Avanthi Just waiting for your detailed post on imput vs output context. Could you please post it as early as possible. Please post the part II for calculation context, waiting eagerly to see it from you. As always, you seem to explain things where I finally have the 8220ah ha8221 moment I8217ve been missing for a very long time. Thanks Once again this one page has helped me get past a problem point. I kept trying to use ForEach and ForAll and what I need was IN Delivered 100 I am working on a report where I need to use calculation contexts8230I have the following dimensions. Users, Dates and Comments. And my table looks like this: U1 D1 C1 U2 D2 C2 U3 D3 C3 U3 D3 C4 U4 D4 C5 U4 D4 C6 U4 D4 C7 U4 D4 C8 But the Comments with the same date and username are actually the same comment8230and needs to be counted for only once. I used calculation contexts using Count(CommentIn(UserDate)). Its not working and its is giving me the following results8230 U1 D1 1 U2 D2 1 U3 D3 0 U4 D4 0 Please help ASAP Is a section considered to be a filter I have report with sections and I need to calculate a rolling sum for the previous 3 months, but I need to filter the resulting table so that it shows months 4-6 but calculates the running sum using months 1-3. Because of the version that I am running I need to calculate the sum as hours previous(hours) previous(previous(hours)). I have added the NoFilter() function around the sum calculation. When I look at the first section, the sum is correct, but when I look at the next section, the sum is being calculated using the hours figure from the first section also. So I can only assume the NoFilter() function is removing the section in the calculation. Is there any way of using NoFilter() but resetting the calculation for each section Your post is really helpful..Inspired by all your work..I myself wrote one here: gauravkalra. wordpress Let me know how does that look. I have included very less detail in my first post..and tried to keep it interesting too:). I hope to follow up with more of them. Glad to have helped. Yes, a section is definitely a filter. But all is not lost. When I have needed to do this in the past, I have done something along these lines. Assume that our section is on the Resort object, and there are three years of data within each section. I want a running total of 3 years, but only where the resort is the same. I might build three objects. The first is called 8220Previous Revenue8221 and it has this formula: If Previous(Resort) Resort Then Previous(Revenue) else 0 The next is called Previous Previous Revnue: If Previous(Previous(Resort)) Resort Then Previous(Previous(Revenue)) else 0 Finally the running 3 years of revenue: Revenue Previous Revenue Previous Previous Revenue The total will then compare the current Resort value to the previous two rows, and only include the revenue when the resort values are the same. At the same time, you could use the RunningSum() function which already has a reset function built in. So what you really have is this: U1 D1 C1 U1 D2 C2 U3 D3 C3 U3 D3 C3 (this should be C3, not C4, as it8217s the same comment) U4 D4 C4 U4 D4 C4 U4 D4 C4 U4 D4 C4 (the last four are the same) What is the desired output from this Hi Dave, I keep reading your blog to find a solution for a data calculationanalysis problem. I have a measure called result value for A4,3,2,lt2,lt2 and for B4,3,lt2,lt2,lt2. The system proveds a measure called numeric value for A4,3,2,2,2 and for B4,3,2,2,2 by removing quotltquot sign. The system also give a measure calledcalculated value for A4,3,2,1,1 and B4,3,1,1,1 by using half the value after quotltquot. I need to use a rule for my calculation. The rule is: if total count of quotltquot is less than the total count of data number, use half of the value after quotltquot. if total quotltquot is more or equal to total count of data, put the data with quotltquot to 0. I create a measure calculated valuenewin tab quotreport 1quot which gives A4,3,2,1,1 and B4,3,0,0,0. When I calculate average and percentile for calculated value and calculated valuenewfor A and B, there is no problem. But when I create another tab quotreport2quot to summarise the average and percentile, there is no problem for the average and percentile for calculated value but gives multivalue for the calculated valuenew. I try everything and not working. Por favor ajude. Regards, Shaohua Hello, I8217m having the next problem and I want to see if you can give me some advice about it, let me explain. I have two data providers, this because the data comes from distinct databases. TABLE1 TABLE2 Date id detail Detail Cost 29413 A A1 A1 5 29413 A A2 A2 1 29413 A A3 A3 3 29413 B B1 B1 4 29413 B B2 B2 2 29413 C C1 C1 7 29413 C C2 C2 4 29413 C C3 C3 3 The report I need to launch must look like this: REPORT Date id Cost 29413 A 9 29413 B 6 29413 C 14 But what I get is something like this one: REPORT Date id Cost 29413 A 29 29413 B 29 29413 C 29 I tried to use the next combinations: Sum(cost) ForEach(Date, Id) RunningSum(costRow) RunningSum(costDate, Id) RunningSum(cost) ForEach(Date, Id) Can you help me with this calculation Hi Dave, When we use Foreach in aggregation functions with Where clause then do we need to follow specific order for specifying Foreach clause PLease see below example: My Formula is Average( Session Average Where(KP1822118243 And(Session Status8221C8221) And(Year822120138243) ) ForEach(Course CodeSession Number) ) This above formula gives right rsults but if i specify Foreach clause before 8220where8221 clause then it gives wrong result. Average( Session Average ForEach(Course CodeSession Number) Where(Kp1822118243 And(Session Status8221C8221) And(Year822120138243) ) ) PLease help me to understand the difference. Thank you, Mani Your posts are so informative and I8217m a big fan. I8217m sure this is simple and I8217m missing something, but I8217ve tried every variation of calculation context to no avail. I have four columns (shown in 8216table8217 below). I want the percentages to calculate correctly as shown in 8220COLUMN48243, but for some reason, they will not calculate as needed. So basically, I want to determine how many times a particular car feature is being used in unique models within the subset of unique Makes in the table. I then want to rank the Top 3 Car Features based on the USAGE RATIO column. It seems simple enough in theory, but I8217ve literally spent hours on this and cannot figure it out. Please let me know what I8217m missing. I would TRULY appreciate it. For the USAGE RATIO column, I8217ve used the following calculation contexts (in every variation): COLUMN3COLUMN2 Foreach(MAKEMODEL)in Block COLUMN3COLUMN2 In(MAKEMODEL) COLUMN3COLUMN2 In(CAR FEATUREMAKEMODEL) COLUMN1 COLUMN2 COLUMN3 COLUMN4 CAR FEATURE MAKE (Unique) CAR FEATURES IN UNIQUE MODELS USAGE RATIO (Column3Column2) Navigation System 50 15 30 Rear backup Camera 15 6 40 Heated Seats 30 12 40 Moon Roof 45 30 67 Top Air Bags 20 10 50 I posted a calculation context dilemma earlier, but it hasn8217t shown up yet on the site (hope it went through Please let me know if you did not receive it.) I wanted to provide a cleaner screenshot of the table in question, but can8217t figure out how to attach one to this forum. Basically, I8217m just trying to get Column 4 (USAGE RATIO). It8217s so simple on paper, in Excel, but for some reason, not in BO due to, I believe, calculation contexts, but none work for me. For some background, if you look at the data hierarchically, 8216Make8217 is at the top level, Unique 8216Model8217 is a subset of Make, and 8216Car Feature8217, the most detailed level, is offered in some 8216Models8217 by the associated 8216Makes8217. I want to show how many times a Car Feature is used in the unique Models of a given Make (which I have), and then divide that number of Models by the number of Makes for each Car Feature (which I can8217t figure out how to do and render correct results). I literally have no other folks to consult who have any BO knowledge, and BOB has produced no working suggestions so far. Hoping you can help8230 Thanks. say if I have a measure object in my report and I create a variable out of it(with no context defined) Example categorizing the revenue measure(1-100 million,100-200 million) . what will be the default context on that measure would it consider all the dimensions within the report while creating the variable The default context is based on the dimensions that are included in the block (or section) containing the new variable. For example, if the measure is in a stand-alone cell the output context would be 8220In Report.8221 If the measure is within a block, then the dimensions in the block determine the output context. If you include the specific context 8220In Report8221 within the formula, and place that measure inside of a block, then the specified context will override the dimension structure and you8217ll get the overall report total instead. Thanks, Dave, for the quick response. But the problem for me is, I have to create a section on the new variable. Just to let u know, when I used only rev in the formula 8216rev 1mill8217 then 82161-100mill8217..same Id is appearing in different categories(investigating this i found that the id has two rows in the table(database) because of a column(which is not available in my report) which has different values). So for the formula I used something like this 8216rev in (id)1mill8217 then 82161-100mill82178230thus defining the context for the measure limiting it to only the id. I was able to set up the section on this variable but ran into issues when trying to create an input control on this variable. I understand this blog is not intended for personnel issues8230please ignore this if am wasting your time. Really appreciate your contribution to Business Intelligence world..especially for starters like me. You generally cannot use a measure (or a variable derived from a measure) as a section. The reason for that is the measure scope (or context) is defined by the section, not the other way around. When I have had to create a break down by range (10-19, 20-29, 30-39 and so on for ages, for example) then I have created that as a dimension object in my universe instead of trying to do it on the report. I am new to BOB webi reporting and have started at a new company where the universe is set up differently than I have worked with before, we are trying to create a simple TY vs. LY rolling 12 month report (month to date plus last 11 months compared with same time LY) I am able to get the rolling using (year100) month Nbr for each block. (block1 has LY data and block2 has TY data) the issue I am having is creating a variable that can calculate data from each block. The report is displaying Month, week of month, Returns, Sales and RA Sales for each 12 month block. Last Year (Block1) This Year (Block2) Month Week RRA LY Sales LY Month Week RRA TY Sales TY Aug 1 50 6,000 Aug 1 20 7,000 What I am wanting to do is add a 3rd block or incorporate the totals into the 2nd block that calculates RRA TY RRA LY (created variable RRA TY-LY Change) and another calculation that shows the difference (RRA TY-LY ChangeRRA LY) When I try and add these to the report I get a single value duplicated in each row or a multivalue error. Any suggestions Hope you can help a complete newbie. I8217m working in Webi Intelligence (BOXI XI R2) with no access universe design. I have created a report measure variable in web intelligence which returns 1 if a record is current and 0 if not. I have a table on the report with a section break on case manager. If I do a sum on this measure in the table footer it returns the correct value for that section. However, I8217ve been trying to do a summary table in a seperate block and when I try exactly the same formula in that, i get the multivalue error. Any ideas Marcus, the problem is probably related to the fact that your 01 indicator is only valid at the row level. Once you try to project it to a higher level you get a MULTIVALUE error because there are multiple values (two different states, in this case) to pick from. What you might try instead is to use your current indicator as part of a 8220Where8221 clause on a sum, as the values used there do not have to appear in the block. Something like: sum(Measure) where (Current Flag 1) Do you have separate objects in the universe for this year (TY) and last year (LY) or are you breaking them apart on the report I have a problem in calculating the time taken for a particular status alone involved in a service request. multivalue error. One service request will have multiple no of status such as ( pending, work in progress. closed etc).Now i want to calculate the time taken for the status 8221 pending8221 which should in the business days calculation. Request Status Start Time Stop Time Total Time Taken 101 draft 1-Jul-13 5-Jul-13 4 101 review 6-Jul-13 7-Jul-13 1 101 WIP 7-Jul-13 8-Jul-13 1 101 Pending 8-Jul-13 9-Jul-13 1 101 Pending 10-Jul-13 11-Jul-13 1 Expected output Request No Total Time Taken(Pending) 101 2 Hi, Can you provide me Calculation Context Part II Hi Dave thanks for the extrordinary articles always8230. 4 years had past we are eagerly waiting for the later chapters Me too When am I going to get around to writing them, does anybody know In all seriousness, I have dusted off my draft for part two of this article and hopefully will have it ready to post without too much delay. I love your blogs and am so glad they come up frequently when I am searching for something. I8217m a little stumped here8230 I have a situation where I am pulling in a couple of dimensions (customer and fiscal periods) and the sales associated. What I want to do is show the sales for each customer for ONLY the latest fiscal period. So for example I am showing: Cust 1 8212 201401 8212 1,000 Cust 1 8212 201402 8212 2,000 Cust 1 8212 201403 8212 1,500 Cust 2 8212 201401 8212 1,700 Cust 2 8212 201402 8212 2,000 Cust 2 8212 201403 8212 2,500 What I WANT to show is: Cust 1 8212 201403 8212 1,500 Cust 2 8212 201403 8212 2,500 I8217ve gotten it pretty close, but I can8217t seem to get it just right. Is there any way to get a measure for the max (dimension) If there is, I can8217t seem to find it anywhere or guess at what the syntax might be. So I created a variable to give me the max fiscal period and since they are chosen via prompt, the varialbe is Max(Main Query. Fiscal Period) In Report. I called it MaxUserResponse. Then I came up with this formula: (Sales ForEach (MaxUserResponse)) The result I am getting is the total of Sales across the fiscal periods, which makes sense, since that is what ForEach does. But I tried (Sales In(MaxUserResponse)) also. I got the total for all customers for all fiscal periods. when I tried (Sales In(CustomerMaxUserResponse)) I got the total across all fiscal periods per customer. What am I missing I know I am close8230 Please help Thank you I think I figured it out. I just added a where clause to my formula. So now it looks like: (Sales In (Main Query. Customer Name)) Where (Main Query. Fiscal Period MaxUserResponse) Thanks for reading8230 Tietje excellent post8230 Were you able to publish rest of the context operators as per suggested by you8230 I am sure reading your posts will surely help clarify lods of my doubts. Moreover do you have a link or website where in i can access other posts of yours to get better insight of BO Hi, I need to implement a similar solution. I need to split the data into three category. based on the percent to total value, the top 70 into catagory 1. next 20 to category 2, last 10 to category 3. Any idea how i can do that. Ver Useful Link, It saved my day. Thanks Dave. I have a requirement to display an average number of beds in a hospital, but each hospital has a validity start and end date. I need to display the number of beds per hospital at a summary level, which is an average number for each hospital irrespective of how many entries there are for validity dates per hospital. Detail level data: Hospital - Validity start - Validity End - No of Beds 8212821282128212821282128212821282128212821282128212821282128212821282128212821282128212821282128211 ABC - 01012000 - 31012000 - 10 ABC - 01022000 - 28022000 - 20 DEF - 01012000 - 31012000 - 20 GHI - 01012000 - 31012000 - 30 GHI - 01022000 - 28022000 - 30 I need the above data summarised as follows: Hospital - Avg. No of Beds per hospital 82128212821282128212821282128212821282128212821282128212821282128212 ABC - 15 DEF - 20 GHI - 30 I have tried to average the measure ForAll 8220Validity Start8221, in an effort to exclude the date dimension from the calculation. I have also tried to average the measure 8220In Hospital8221 in an effort to only include Hospital in the calculation context. In both cases, I get the following output, where it adds up the measure for every entry of date, per hospital: Hospital - Avg. No of Beds per hospital 82128212821282128212821282128212821282128212821282128212821282128212 ABC - 30 DEF - 20 GHI - 60 Can you please help I have a weird situation. I have Account nos and balance coming from one query. The BO report seems to neglecting the negative balance. So when I sum up the balance only positive values are considered. That is to say Sum(Balance) gives the same result as Sum(Balance) Where (Balancegt0) and Sum(Balance) Where (Balancelt0) returns null. But there is negative balance. If I pull account no and balance into a separate report and apply a report filter for Balancelt0 then I can see the negative balances against the accounts. But if I remove the accounts then it displays blank cell for balance. Any idea what is going on. I used the example from this link bi. srivatsakr201108converting-rows-into-single-cell-comma. html to get multiple text values corresponding to an id into one cell, but as I need to do this for two type of multiple values, and my main query has already too much information, I did everything exactly as in the example in my main query and worked beautifully, but for the second one I am attempting to create it in a second query (as if I include this one also in the main query it takes forever), I tested in a second report and it worked fine, but then I tried to include it in the main report and I get multivalue, I merged the main ids, I made the variables as detail variables, I created an indicator variable (Boolean) for the comparison to the maximum value and it still doesn8217t work. In the second query and report I have something like this ID 8211 type of contact 123 8211 regular mail 123 8211 email 123 8211 phone 234 8211 email when I do the link example in a second report I8217m able to get it to look like this: ID 8211 Type of contact 123 8211 mail, email, phone 234 8211 email but when I try to move it to the main report it looks like this: ID 8211 Type of contact 123 8211 multivalue 234 8211 email my variables look like this: This one I also tried it as a Boolean and it still didn8217t work. Max Type ContactMax(Type of Contact) In (Query2.ID) A detail variable link to the main id of Query1 ID Type of Contact Type of Contact A detail variable link to the main id of Query1 Concat Type Contact If IsNull(Previous(Self(ID)))Then ID Type of Contact Else (ID Type of Contact8221, 8220Previous(Self(ID))) A measure variable: All Type of Contact Concat Type Contact Where (ID Type of Contact Max Type Contact) What am I missing how can I properly link it to the main report and get it to work Thanks a lot in advance, Hi Dave, when are you going to write about context in much more details. awaiting your post. please make it fast. Was wondering if you could help me calculate the percentages (G) of inlist values (VX) and (YX) within the same dimension(V, X,Y) on a crosstabs. V X Y G F A 6 100 25 B 12 200 50 B 18 300 75 C 24 400 100 D 30 500 125 E 36 600 150 I have a requirement in a Webi Report as below. I have everything except the YTD Planned cost. So now I need to calculate the YTD Planned cost based on the Planned cost, Portfolio, Project Name, Month and Frequency. Can some body help me how to achieve this in BO Webi or through SQL query is also fine. Hi Dave, I became a big fan of you. But I am not able to find the next blogs on input and output contexts as promised by you in this blog. Is it that you have not published those yet or I am not finding the proper link Eagerly waiting for your posts. Regards, Arup I am having a lot of trouble getting a simple query to change to what i want it to 8211 I believe i am inputting the formula correctly as i have not have problems before using something like this:. query 1 (Product Store Stock) Query 2 (Store) Distinct list of store8217s set by myself in a different universe. Merge: query1.store query2.store Source dimension: Query2.store Currently query 1 will give me a total stock figure by store product level. I require the store8217s from query 2 to be the one i sum up against so i8217ve tried: Sum(stock. Total Branch Stock Unit ForEach (Query 2.STORE)) This still gives me the stock figure from query 1 (it should be lower as i have tested this on another tab to see what the output is). I8217ve tried many variations of the above formula but all seem to get me the sum of product from query 1 when infact i need it to sum against query 2 store. Please advise, help would be much appreciated. Deixe uma resposta

Comments