Monday, February 19, 2018

Mapping load to load multiple tables in one Go.





TABLES:
MAPPING LOAD * INLINE [
ID,TABLE
1,Table1
2,Table2
3,Table3
4,Table4
5,Table5
];




FOR A = 1 TO 5

let vTable = ApplyMap('TABLES',$(A));
'$(vTable)':
LOAD *;
SQL SELECT * FROM $(vTable);



Store $(vTable) into into $(vTable).QVD;

DROP TABLE $(vTable);

NEXT

Monday, December 4, 2017

Removing Preceding Zero from any filed in QLikview

Requirement is to remove leading zeros from field values of Numnber. This is a text field and can contain numeric or alpha-numeric values.
The trick I could do is:


=replace(ltrim(replace(Field,'0',' ')),' ','0')



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 

Thursday, April 20, 2017

Create Hyperlink in qlikview table, chart.


  • Go to expression.


  • exp. definition: -  filed& '<url>' & field
  • Set Representation as "Link".




Monday, March 6, 2017

Remove/Add the scroll bar from a chart?

In Qlikview, we have capability  to add or remove the scroll bar in Chart as par the Dimension limit.

By default QV does not include scroll bar even if we have many dimension values, QV just ignore few dimension to fit all the data in chart.
We can include the scroll bar in chart to show fix number of dimension at a time.



  • Go to chart Property -> presentation tab.
  • Check/uncheck scrolling option for dimension limit.







Thursday, February 9, 2017

creating DB connection (oracle) via Qlikview.



Install Oracle driver then.

Make below entry in "tnsname.ora" file. (C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN)

in order to create ODBC/OLEDB credential Via Qlikview.

"DATA SOURCE"=(description=(address=(protocol=tcp)(host= 'hostname')(port=1521))(connect_data=(sid=NLTDEV1)))