# SenseEV

### Get your KPI values from Qlik Sense data model very easy!

The KPI visualization can show one or two measure values, and is used to track performance.

Use KPIs to get an overview of performance values that are central to an organization. Use color coding and symbols to indicate how the figures relate to the expected results.

## Creating a KPI with “SenseEV” Excel functions

### SenseEV stands for “Sense EValuate” and enables Excel to call any Qlik Sense function including set analysis within an Excel formula in a discreet cell.

###### Simple symantic APPID and SERVER are optional settings:

`=SenseEV("Function("Expression","APPID","SERVER")")`

###### Simple Sum with One Measure:

`=SenseEV("Sum([Amount])")`

###### Sum with Single Set Analysis Parameter. Excel Formula set to allow filling down:

`=SenseEV("Sum({<[Quarter]={'"&$B4&"'}>} [Amount])")`

###### Sum with Single Set Analysis Parameter. Excel Formula set to allow filling down.

2nd Parameter, GUID to Pull from different App:

`=SenseEV("Sum({<[Quarter]={'"&$B4&"'}>} [Amount])","eba546df-658a-4b6d-bee5-42d3f9fa55e2")`

###### Sum of Revenue measure created from 2 fields. 2 Set Analysis parameters.

First parameter set to populate from Excel cell values and fill down.

Second paramter uses Excel “Substitute” formula to extract value from header cell, C5, and able to fill across:

`=SenseEV("Sum({<[Product Group Desc]={'"&$B7&"'}, [Fiscal Quarter] = {'"&SUBSTITUTE(C$5,"Q","")&"'}>} [Sales Quantity]*[Sales Price])")`

###### Sum of Revenue measure calulated on the fly from 2 fields. First parameter set to populate from Excel cell values and fill down.

Second set parameter set to only calculate Revenue for the most recent year in the data:

`=SenseEV("Sum({<[Product Group Desc]={'"&$B7&"'}, [Fiscal Year] = {'<$(=max([Fiscal Year]))'}>} [Sales Quantity]*[Sales Price])")`

###### Adds a function to triple the value of the entire calculation:

`=SenseEV("Sum({<[Fiscal Year] = {$(=max([Fiscal Year]))}>} [Sales Quantity]*[Sales Price])")*3`

###### Only calculates for “Last Year”:

`=SenseEV("Sum({<[Fiscal Year] = {$(=max([Fiscal Year])-1)}>} [Sales Quantity]*[Sales Price])")`

###### Dynamic Title to show the text “PRODUCT SALES VOLUME” along with each selected value of Region delimited by a “/” for the most recent year:

`=SenseEV("'PRODUCT SALES VOLUME '&Upper(Concat(distinct [Region],' / ')) &' '& max([Fiscal Year])")`

###### Dynamic Title to show each selected value of Region delimited by a “/”:

`=SenseEV("Upper(Concat(distinct [Region],' / '))")`

###### Formula to quickly populate an array. Measure created on the fly with two set parameters both referencing Excel cell values.

First set value allows filling down, second set value allows for filling across:

`=SenseEV("Count({<[Case Owner Group]={'"&$A4&"'}, [Priority] = {'"&B$3&"'}>} [%CaseId])")`

###### 3 Set Values set to dynamically filter data based on column header values from Excel cells.

1st and 2nd levels are fixed.

3rd level allows filling down. 4th and 5th levels filter for only Income Statement and Actual values:

`=SenseEV("Sum({<[1st Level]={'"&$B$12&"'},[2nd Level]={'"&$B$14&"'},[3rd Level]={'"&$C15&"'},Statement={'Income Statement'},DataCategory={'Actual'}>} [Amount])")`

###### Same as above additionally filtered for only most recent year’s data:

`=SenseEV("Sum({<[1st Level]={'"&$B$12&"'},[2nd Level]={'"&$C13&"'},[Year] = {$(=Max([Year])-1)},Statement={'Income Statement'},DataCategory={'Actual'}>} [Amount])")`

###### Filters for only the data from 1 year prior to the most recent values of date in the data:

`=SenseEV("Sum({<[1st Level]={'"&$B$12&"'},[2nd Level]={'"&$C13&"'},[AsOfMonth]=,[DateCounter] = {$(=Max([DateCounter])-12)},Statement={'Balance Sheet'},DataCategory={'Actual'}>} [Amount])")`

###### 2 levels of Set parameters to filter based on Excel cell values. Additionally populates set parameters to filter for dates derived from an Excel cell value. Allows for filling across:

`=SenseEV("Sum({<[1st Level]={'"&$B$12&"'},[2nd Level]={'"&$C13&"'},Year = {$(=Year('"&E$10&"'))},[Month] = {$(=Month('"&E$10&"'))},Statement={'Income Statement'},DataCategory={'Actual'}>} [Amount])")`

###### 3 levels of Set parameters to filter based on Excel cell values. Additionally populates set parameters to filter for dates derived from an Excel cell value. Allows for filling across:

`=SenseEV("Sum({<[1st Level]={'"&$B$12&"'},[2nd Level]={'"&$B$14&"'},[3rd Level]={'"&$C15&"'},Year = {$(=Year('"&E$10&"'))},[Month] = {$(=Month('"&E$10&"'))},Statement={'Income Statement'},DataCategory={'Actual'}>} [Amount])")`

###### Calculation for a snapshot in time, Balance Sheet, using AsOfMonth as the filter:

`=SenseEV("Sum({<[1st Level]={'"&$B$12&"'},[2nd Level]={'"&$C14&"'},[AsOfMonth] ={'"&E$9&"'} ,Statement={'Balance Sheet'},DataCategory={'Actual'}>} [Amount])")`

###### 3 set parameters. 1st level is fixed. Second level allows filling down. 3rd level is fixed:

`=SenseEV("Sum({<[1st Level]={'"&$B$11&"'},[2nd Level]={'"&$C12&"'},[CompanyID]={'"&E$9&"'},Statement={'Income Statement'},DataCategory={'Actual'}>} [Amount])")`

###### 3 set parameters. 1st and 2nd levels are fixed. 3rd level allow filling down:

`=SenseEV("Sum({<[1st Level]={'"&$B$11&"'},[2nd Level]={'"&$B$13&"'},[3rd Level]={'"&$C14&"'},[CompanyID]={'"&E$9&"'},Statement={'Income Statement'},DataCategory={'Actual'}>} [Amount])")`