Monday, September 11, 2017

Create custom short in QLikview?

Sometimes, we face scenario wherein we need to customize the sort in some specific order of values in Chart\tables.

By default we have option in qlikview to sort data in acceding or descending order.


In expression of Sort tab, use below

Match(Dim,'val1','val2','val3','val4')

or 

Minstring({1}WildMatch(DIM,,'val1','val2','val3','val4'))


Another scenario

how the sort order in a chart can be controlled by a user option.

  • Create a input box and set user input in variable lets say -  Vprimecustomer
  • in chart sort tab, check expression and use below formula

                       replace(match(Dim,'$(Vprimecustomer)'),0,1000)

this will show user input as first value in chart/table.

thanks,

Wednesday, September 6, 2017

Calculate MOM calculation in chart or table in Qlikview.

If we need to calculate YOY or MOM calculation in Qlikview. We can achieve it by following below steps.


  • If we need MOM revenue, Create a variable for previous month as below.
vPriorMonthYear = Date(addmonths(today(), -1), 'MMM-YYYY')
  • This will give you month-year value for Previous month.
  • In your chart or table expression, please use below formula.

=Sum(num#([Revenue]))- Sum({<[Month Year]={'$(vPriorMonthYear)'},FISCYEAR=,Month=>}Num#([Revenue]))


This will show the MOM value, means current month revenue minus previous month revenue.


thanks,
Shiv Shrotriya