# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for
Did you mean:
Partner - Contributor

## Looking for suggestion on below query

Hi,

Can anyone help me on the below queries

1.How to calculate Halfyear and Financial year for given date(ex:OrderDate).

2.Sales growth TY vs LY (TY=This Year and LY=Last Year) using KPI object with conditioning color.

3.YTD sales, LY YTD sales and Year salary.

Color code: TY YTD<LY YTD, RED arrow down

Color code: TY YTD>LY YTD, Green arrow Up

4.Make a Point Map object showing City wise sales across the globe. Bubble size should vary with sales amount.

TY YTD<LY YTD, RED , TY YTD>LY YTD, Green

4 Replies
Anonymous
Not applicable

Hi Please Try these measures and let me know if it works.

 Last Year to Date sum({}Sales) Current Year to Date sum({}Sales) Running Total rangesum(above(sum([Material Cost]),0,rowno())) Current Year Sales Sum( {} Sales) Last Year Sales sum({} Sales)

For Text Coloring to change follow the steps:

1. Right Click on the text object and go to general background color select color icon.

2. In the Base Color Check the Icon Calculated instead of base color and enter the following expression.

if(sum({<Year={'\$(=max(Year))'}>}Sales) > sum({<Year={'\$(=max(Year)-1)'}>}Sales) , green(),red())

Hope this should be helpful. Let me know if you have any questions.

Thanks

Mouna Chandra.

Partner - Contributor
Author

Tq.its works.can u explain me conditional colors in qliksense

if(sum({<Year={'\$(=max(Year))'}>}Sales) > sum({<Year={'\$(=max(Year)-1)'}>}Sales) , green(),red())

I am getting different result if i applied above code for measures.

Champion

Hi,

that is a set_analysis_statement - in case the sum of sales in the last year (where >> Year = max(Year <<) is bigger than the sum of the prior year (where >> Year = (max(Year)-1) <<), then it turns green, otherwise it turns red.

Inside the set_analysis, the field >>Year<< is compared to the value in {} and within that, using that '\$()' part, Mouna is apparently building an expression which is then evaluated first (and then the field >>Year<< is compared to that expression)

Anonymous
Not applicable