Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Exclude total for one date

Hi ,

We were showing the business starts from every last day of month end to till date and now we were doing normal total.

But the businesses want to exclude the month end and include the total starts from 1st of month.

Below is the output qlikview which need to exclude the first row value in the total.

Untitled.png

Dimension: =if(Date>='$(vMonthEnd)' and Date <='$(vCurrMonth)',Date)

where vMonthEnd  = (monthend(addmonths(Date(today(),'MM/DD/YYYY'),-1)))

      vCurrMonth  = =(MonthEnd(today()))


Expression :  Sum(Product$)

Chart Type :  Straight Table

So the final total should show as $21,600,243 - $3,841,198 = $ 17,7590,45(Final Total $)

Thanks..

1 Solution

Accepted Solutions
sunny_talwar

Dimension:

Date

=pick(match(WeekDay(Date),'Mon','Tue','Wed','Thu','Fri','Sat','Sun'),'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday')

Expression:

=If(Dimensionality() = 0,

Sum({<Date = {"$(='>=' & Date(MonthStart(Today())) & '<=' &  Date(MonthEnd(Today())))"}>}Product$TY),

Sum({<Date = {"$(='>=' & Date(MonthStart(Today())-1) & '<=' &  Date(MonthEnd(Today())))"}>}Product$TY))

View solution in original post

23 Replies
Frank_Hartmann
Master II
Master II

what if you put:

=if(Date>'$(vMonthEnd)' and Date <='$(vCurrMonth)',Date)

sunny_talwar

May be you need to use Aggr function to fix this:

Sum({<Division -= {.......}>}Aggr(Sum(Product$), Division, Day))

Add the set analysis to exclude 7/31/2016

Question: Your date field is called Division?

nareshthavidishetty
Creator III
Creator III
Author

Yes,division is my date.

Thanks..

nareshthavidishetty
Creator III
Creator III
Author

where division  =if(Date>='$(vMonthEnd)' and Date <='$(vCurrMonth)',Date),which is an calculated dimension.

Thanks..

trdandamudi
Master II
Master II

Change your vMonthEnd as below:

= (MonthStart(addmonths(Date(today(),'MM/DD/YYYY'),-0)))

So that it will start from 08/01/2016.

sunny_talwar

Do you only want the total to change or do you want to get rid of the complete row?

nareshthavidishetty
Creator III
Creator III
Author

Hi ,

I want to show the data from last of month end to till date but i need to exclude the last day of month end value in total.

Ex: Need to show data in the chart from 31/8/2016 to till date but the total should be from 1/8/2016 to tilldate.

Thanks..

Anil_Babu_Samineni

Can you please post sample Attachment

Use Expression some thing

Sum({<Date = {*} >}Product & '$') - Sum({<Date = {"07/31/2016",''MM/DD/YYYY'} >}Product & '$')


Sum({<Date -= {"07/31/2016",''MM/DD/YYYY'} >}Product & '$')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

I think this is what you need:

Sum({<Division -= {.......}>}Aggr(Sum(Product$), Division, Day))

If you are unable to make it work, would you be able to provide a sample?