Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, guys!
Please help me find a solution. I have a problem here.\
This is my table:
Employee | DataAccount | DateAccount |
Pavel Kovalski | 1,00 | Nov 2014 |
Pavel Kovalski | 1,00 | Dec 2014 |
Pavel Kovalski | 1,00 | Jan 2015 |
Pavel Kovalski | 1,00 | Feb 2015 |
Kirill Abramov | 0,00 | Mar 2014 |
Kirill Abramov | 0,00 | Oct 2014 |
Kirill Abramov | 0,00 | Nov 2014 |
Kirill Abramov | 0,05 | Jan 2015 |
Kirill Abramov | 0,14 | Sep 2014 |
Kirill Abramov | 0,23 | Sep 2014 |
Kirill Abramov | 0,64 | Sep 2014 |
Kirill Abramov | 0,95 | Jan 2015 |
Kirill Abramov | 1,00 | Feb 2014 |
I need to find Max value of DataAccount for each month.
I try like :
Load Employee, DateAccount ,
Max(DataAccount) as Values
Resident Table2
Group By Employee, DateAccount ;
But it doesnt work, it gives me this :" - " for each eriod . I also tried like Num#(Max(DataAccount)) or Num(Max(DataAccount)), but again no result.
Hi Diana,
where are your datas from?
have you tried num#(DataAccount,'#,##') ?
As I can see all datas are between 0,05 and 1, so maybe they are percentage values.
If I can't script the script edit to get calculateable values use a trick:
change the values to percentage
0,05 = 5
0,65 = 65
1,00 = 100
so that there are no commas.
load the datas and then recalculate them by devide them by 100
load DataAccount/100 as DataAccount
For this value you can calculate the max.
Regards
Hi Diana,
Try this:
aggr(max(DataAccount),DateAccount) in your straight chart.
Regards
KC
Hi, Jyothish!
I need to find this max values in the load script..
Can't find an error, for me it works.
Hi,
You can try like this.
Table1:
Load
Employee,
DateAccount ,
Values
from ................;
Table2:
Load
Employee,
DateAccount ,
Max(DataAccount) as Values
Resident Table1
Group By Employee,DateAccount ;
Drop table Table1;
Hi, Martin!
I guess I have a problem with number format. I can't figure out how to change this format to make this work. As I mentioned above I tried Num#(Max () ) and num (Max ()).
Any suggestions?
Hi Diana,
maybe your DataAccount can't be interpreted as a number.
For that you can't calculate a max value.
How are the datas shown in a list box? right aligned or left aligned?
if left aligned QlikView thinks that the datas are a string, not a number.
In that case you have to use a syntax like this
max(num(num#(DataAccount,'#,#'))) as Value
num# defines the syntax the datas are in = decimale sting is a comma
than you have to recalulate them as a numeric field with num
and finally you can calculate the max
I can't test it on my system because for the the decimal seperator is comma
Regards
Hi Diana,
Are you using a inline table? If yes then "," between numbers will create an issue.
Or try:
num(num#(Yourfield,'###,###')) as Yourfield
PFA.
Regards
KC
Hi,
In script remove the comma(,) and put point(.).
Try this
Load Employee, DateAccount ,
Max(num#(DataAccount,'#,##')) as Values
Resident temp
Group By Employee, DateAccount ;