Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to create a scatterplot with two measures and one axis.
I want to display the data only for the latest date, but it doesn't work. I am using "max(date)" to get the latest date data, but I'm using it for the axis, so I get an error.
(ex: If(date = max(date), customer) )
The data I want to use are:
Axis: customer, (date (I want to get the latest value))
Measure: sales, region
How can I make it work?
At the moment you have two Dimensions Region and Customer and one Measure Sales
One would ideally restrict the data in the Measures using Set Analysis as below
X-Axis = Sum({<Datefield={"$(=Date(Max(Date)))"}>}Sales)
Y-Axis = Sum({<Datefield={"$(=Date(Max(Date)))"}>}SomeOtherMEasure)
DataPoints = Customer
thank you!
I tried to get the maximum value of the date with max in the load script, but an error occurred.
Can I use the max function in the load script like below?
ex)
Load.....
Max([date]) as [max_date]
Resident Sales
Group by xxx;
can you post your actual script and the a screenshot of the error message you received
It worked fine up to the point of calculating the maximum and second value of the date in the load script,
The part of the script that takes the difference of the values (Diff) doesn't work.
The Error is because the fields [first] and [second] do not exist in table Temp1
The Max table should be joined to Temp1
Add the below highlighted to add [first] and [second] to Temp1 table
Temp1:
Load ...... resident Sales;
Left Join(Temp1)
Load id,...[first],.....[second]
Resident Temp1
Group by id;
Diff:
load
.......
Thank you so much! This solved the problem!
and I wanna add other data from other table.
When I load the data it gets stuck here and doesn't progress for more than a few minutes.
Is it possible?