Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, how do I edit to only have January to the on going month and exclude the future months that show -100% for this comparison.
This is my measure
(
SUM(IF(YEAR(TRANSACTION_DATE)=vCY,AMOUNT))-SUM(IF(YEAR(TRANSACTION_DATE)=vPY,AMOUNT))
)
/
SUM(IF(YEAR(TRANSACTION_DATE)=vPY,AMOUNT))
and this is my dimension
=[TRANSACTION_DATE.autoCalendar.Month]
You can use set analysis to achieve that: Avg({<Date = {"<=$(=Today())"}>} ValueField). This will only values from before Today().
To display only the past months and exclude future months in your measure, you can use Qlik's Set Analysis to limit the data to the current date.
Dimension:
=If(Month(TRANSACTION_DATE) <= Month(Today()), Date(MonthStart(TRANSACTION_DATE), 'MMM'))
Measure:
(
Sum(If(Year(TRANSACTION_DATE) = vCY AND Month(TRANSACTION_DATE) <= Month(Today()), AMOUNT)) -
Sum(If(Year(TRANSACTION_DATE) = vPY AND Month(TRANSACTION_DATE) <= Month(Today()), AMOUNT))
) / Sum(If(Year(TRANSACTION_DATE) = vPY AND Month(TRANSACTION_DATE) <= Month(Today()), AMOUNT))
*** When applicable please mark the correct/appropriate replies as "solution". Please LIKE threads if the provided solution is helpful to. ***
I get that you're calculating the year-over-year percentage change.
=((Sum({$<Date={"$(='>='& Date(YearStart(Max(TRANSACTION_DATE)))&'<='Date(Max(TRANSACTION_DATE)))"},Year,Quarter,Month,Week>} AMOUNT)
-
Sum({$<Date={">=$(=YearStart(Max(RANSACTION_DATE), -1))<=$(=AddYears(Max(RANSACTION_DATE),-1))"},Year,Quarter,Month,Week>} AMOUNT))
/
Sum({$<Date={">=$(=YearStart(Max(RANSACTION_DATE), -1))<=$(=AddYears(Max(RANSACTION_DATE),-1))"},Year,Quarter,Month,Week>} AMOUNT))
All the above have not worked for me but in the limit of time for my ppt , this simple filter on the meause has helped me