Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
This is my question, Assume that I have sales data from the month Jan 2013 to Jan 2014 in excel document. Then I am creating a barchart in qlikvew, Now I want to display the the current month's bar first, if this month is feb then Feb's bar should be displayed first. Is this possible to do in qlikview?
Thanks,
Varun Krishna. P
OK. In any case you'll need to order months. Balancing between text and numeric display of the month is linked to Month() function. The text display is usually a shortened version of the month name, like Jan, Feb etc. Normally month names list is displayed as a parameter at the beginning of the script. It can eventually be changed to match with the complete month names you have in your Excel files (but it could cause other problems). Otherwise, it can be done in your graph with Match() function.
2nd month in your Excel file is Feburary, I guess it's just a typo to be corrected in Excel.
In your graph, first dimension is Month column, second is Year.
1) Month: turn the dimension into a calculated one:
=if(Match(Month,'January','February','March','April','May','June','July','August','September','October','November'
,'December')>=Num(Month(Today())), Month)
Name that dimension Month, tick the box to not show nulls, you'll get the month names of current month and after.
2) To order months: I see your Excel file has a Date field in 1st column, if it's loaded it Qlikview it will ease matters, you can sort months by this expression ascending:
=Avg(Num(Month(Date)))
If Date field is not in Qlikview, you can use Match() again, sorting with this expression ascending:
=Avg(Match(Month,'January','February','March','April','May','June','July','August','September','October','November'
,'December'))
3) Add Year as a second dimension, it should be naturally sorted in chronological order.
This should lead to the graph you want.
Hope it helps.
Varun
After the current month first, what order do you wish the remaining months in ?
Best Regards, Bill
You can sort the months in the Sort tab.
check mark the numeric sort. and keep it in Descending order.
hope this will help.
-Nilesh
Dear Varun,
Sort your MonthYear field in Descending order of Numeric Sorting.
Regards
Kiran Rode
+91 8976977897
if the present month's data is the latest of all then it can be done in the sort tab itself, please explain in what order you want the second and other bars to display.
-sundar
It should be like
Jan'13...... Dec'13...Jan'14(first Bar), Feb'14(Second bar) .......... Dec'14 and so on...
Thanks,
Varun Krishna. P
@Bill Markham
It should be like
Jan'13...... Dec'13...Jan'14(first Bar), Feb'14(Second bar) , March'14,April'14......... Dec'14 and so on...
Thanks,
Varun Krishna. P
Hello Varun,
In this case I assume you will not be displaying Jan'13 to Dec'13 bars.
If so you can use an IF condition in the Month dimension some way like below:
IF(Month>Month(Now()), Month)
Hope this helps..
Hi Varun,
Try this:
In Chart Properties:Sort
Check Expression > Descending
In Expression: Max (MonthYear)
In this case all months will be sorted and the most recent will be the first.
Hi Kiran Rode,
How do I sort MonthYear Field in Descending order on Numeric Sorting?
Thanks,
Varun Krishna. P