# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor

## Current Month Average Daily Charges

Hello,

I am trying to write an expression that gives me average daily charges:

(Sum({<ITEMTYPE={'1000','1001'}, Date = {"\$(=Max(Month(Date)))"}>}Trans)) / (Count(Distinct [Service Date]))

Where ITEMTYPE = 1000,1001 represents charge transactions

I've tried several things but they all give me zero or null.

Tags (2)
1 Solution

Accepted Solutions
Valued Contributor III

## Re: Current Month Average Daily Charges

Ashley,

I guess you must to change your expression a little bit:

(Sum({<ITEMTYPE={'1000','1001'}, Date = {">=\$(=MonthStart(Max(Date)))<=\$(=Max(Date))"}>}Trans)) / (Count(Distinct [Service Date]))

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
3 Replies
Valued Contributor III

## Re: Current Month Average Daily Charges

Ashley,

I guess you must to change your expression a little bit:

(Sum({<ITEMTYPE={'1000','1001'}, Date = {">=\$(=MonthStart(Max(Date)))<=\$(=Max(Date))"}>}Trans)) / (Count(Distinct [Service Date]))

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
Contributor

## Re: Current Month Average Daily Charges

Thanks, I realized I would also have to apply the set modifier to the denominator so :

Current Month Average Daily Charges:

(Sum({<ITEMTYPE={'1000','1001'}, Date = {">=\$(=MonthStart(Max(Date)))<=\$(=Max(Date))"}>}Trans)) / (Count({<ITEMTYPE={'1000','1001'}, Date = {">=\$(=MonthStart(Max(Date)))<=\$(=Max(Date))"}>}Distinct [Service Date]))

Valued Contributor III

## Re: Current Month Average Daily Charges

Pretty good Ashley!

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago