AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 14.08.2019, 23:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
How to get running totals in view
Источник: http://alexvoy.blogspot.com/2019/08/...s-in-view.html
==============

Let's say we need to see bank account balances per day with running totals.
A running totals query is a query in which the total for each record is a summation of that record and any previous records. This type of query is useful for displaying cumulative totals over a group of records (or over a period of time) in a graph or report.
The simplest way to achieve it is to create a view for BankAccountTrans table and add any groupings you need.




In my example, these are Bank account, transaction currency, financial dimension set, and, of course, transaction date.



I use standard aggregation Sum for my daily total and a computed column for running total.



The computed column method reads as follows



public class CDPBankAccTransAggrView extends common
{
private static server str amountCurRunningTotal() // X++
{
return "sum(sum(t1.AMOUNTCUR)) OVER (PARTITION by t1.DATAAREAID, t1.ACCOUNTID, t1.CURRENCYCODE order by t1.TransDate)";
}

}


It is ready for consumption; enjoy your BI inside of D365!




Источник: http://alexvoy.blogspot.com/2019/08/...s-in-view.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
dynamicsaxhints: How to restrict view datasource fields Blog bot DAX Blogs 0 22.03.2016 09:11
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
NAV Team: How to Get your ERP System Up and Running in No Time Blog bot Dynamics CRM: Blogs 0 20.11.2012 23:38
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 14:19.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.