Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi Please Try these measures and let me know if it works.
Last Year to Date | sum({<Year={'$(=max(Year)-1)'},Month ={'<=$(=num(month(Today())))'}>}Sales) |
Current Year to Date | sum({<Year={'$(=max(Year))'},Month ={'<=$(=num(month(Today())))'}>}Sales) |
Running Total | rangesum(above(sum([Material Cost]),0,rowno())) |
Current Year Sales | Sum( {<year={'$(=max(year))'}>} Sales) |
Last Year Sales | sum({<year={'$(=max(year)-1)'}>} 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.
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.
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)
Hope Friedrich Hofmann reply helps you. can you Please close the thread by marking it correct?