AXForum  
Zurück   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Kennwort vergessen?
Registrieren Forum Rules Hilfe Benutzerliste Heutige Beiträge Suchen

 
 
Themen-Optionen Thema durchsuchen Ansicht
Alt 14.08.2019, 23:12   #1  
Blog bot ist offline
Blog bot
Участник
 
25.646 / 848 (80) +++++++
Registriert seit: 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, напишите личное сообщение администратору.
 

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
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

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Gehe zu

Рейтинг@Mail.ru
Alle Zeitangaben in WEZ +3. Es ist jetzt 02:32 Uhr.
Powered by vBulletin® Version 3.8.5 (Deutsch)
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.