Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17878

cumulative totals of measure

$
0
0

How to calculate the cumulative totals of measure in following example:expec_cum_closed.PNG

 

 

 

 

 The model contains a date table and fact table called Internal.The measure EOMClosed is obtained by using

EOMClosed = CALCULATE(distinctcount(Internal[ID]),userelationship(Internal[CloseDate],'Date'[Date]))

 

The measure when sliced by Date dim gives me number of tickets that got closed each month.I want to make it like cumulative/running.

 

 EOMOpen is number of open tickets each month sliced by date like :

EOMOpen = CALCULATE(DISTINCTCOUNT([ID]),FILTER(ALL(Internal),(Internal[CloseDate]=blank()||Internal[CloseDate]>EOMONTH([OpenDate],0))&&Internal[FirstDate]<=max('Date'[Date])))

 

I tried to do the same with EOMClosed but turns out the userelationship is not propogating the context to filter function :

EOMClosed = CALCULATE(distinctcount(Internal[ID]),userelationship(Internal[CloseDate],'Date'[Date]),filter(Internal,[CloseDate]<=max(Date[Date]))

 

Pls guide me to fix the EOMClosed to get cumulative values.

Here is a sample file:EOM.PNG

 

 

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 17878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>