Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

DAX to show data only until current month for tickets open at the end of each month

$
0
0

Hi,

I have the following three measures to arrive at EOMOpen :

OpenTkt:=CALCULATE(DISTINCTCOUNT(TicketIncoming[ID]), FILTER(all('Date'[Date]), 'Date'[Date]<=max('Date'[Date])),USERELATIONSHIP('Date'[Date],TicketIncoming[OpenedDate]))

CloseTkt:=

VAR maxDate =
    MAX ( 'Date'[Date] ) + 1
RETURN
    CALCULATE (
        DISTINCTCOUNT ( TicketIncoming[ID] ),
        FILTER (
            ALL ( 'Date'[Date] ),
            'Date'[Date] <= maxDate
                && 'Date'[Date] <> BLANK () 
        ) )

EoMOpen:=OpenTkt - CloseTkt

This gives me correct numbers,the only issue is ,it shows me data for all months after currentmonth.We dont want to see data for future months.Example: we have to see data all months until March 2019,not for April onwards.

How to fix this.Below is what i see and i dint want to see data for months 4-12 currently.




Viewing all articles
Browse latest Browse all 14337

Latest Images

Trending Articles



Latest Images

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