Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
pacoli2013
Creator
Creator

linear gauges in a straight table

Hello,

I have an expressions which gives me the last 12 months Sales in a straight table and in a LineChart. Dimension is  at the Moment YearMonth. The data I use, hast records with one amount with one date (dd-mm-yyyy)

This expressions is

= Sum({< YearMonth  = {">=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-11),'MMM-YYYY')) <=$(=date#('$(sMonthYear)','MMM-YYYY'))"}, Year=,Month=>} ActualAmount)

So now in December2016 it shows the Sales from dec2015, jan2016......... untill nov2016

I want to make three (mini) linear gauges in a straight table (with Dimension company) from this expressions

so first gauge  for the months dec2015 - march2016, the second gauge  for the months april20165 - july2016 and the last for aug2016 -nov2016

Can I use this Expression or should I build  a new expression with the new Dimension Company.

And how should I do that.

Thanks in Advance

2 Replies
brunobertels
Master
Master

Hi may be this :

assuming you want your YEARS divided in 3 sliding quadrimester , you can adapt your mesure like this :

First gauge dec - march

= Sum({< YearMonth  = {">=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-11),'MMM-YYYY')) <=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-8),'MMM-YYYY'))"}, Year=,Month=>} ActualAmount)

second gauge april - july

= Sum({< YearMonth  = {">=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-7),'MMM-YYYY')) <=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-4),'MMM-YYYY'))"}, Year=,Month=>} ActualAmount)

third gauge august - nov

= Sum({< YearMonth  = {">=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-3),'MMM-YYYY')) <=$(=date#('$(sMonthYear)','MMM-YYYY'))"}, Year=,Month=>} ActualAmount)

hpe it helps

pacoli2013
Creator
Creator
Author

Thanks,

I will test it

Court