Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
I have a Pivot Table where the demension is [Mat Date], I wish to load only the data where the [Mat Date] is Greater than or equal to today.
I have tried to use calculated condition
GetFieldSelections([Mat Date],>=today())
But this has no change
Can anyone help please ?
Thanks
Hi,
I'd rather use the condition in every expression within that chart using set analysis. Calculated dimensions perform really poor with a few dozens of thousands of records, whilst set analysis performs noticeably faster:
Sum({< [Mat Date] = {">=$(=Today())"} >} Sales)
I know that it takes a little bit more of coding, but it's worth spending your time here that the chart rendering slower for the user.
Hope that helps.
BI Consultant
Why do you want to call GetFieldSelections()? I may misunderstood your question, but try a simple
=if([Mat Date]>=today(),[Mat Date])
as calculated dimension and suppress NULL.
Hope this helps,
Stefan
Hi,
Use some thing lke this in the code slighltly change.
=GetFieldSelections( [Mat Date] ) >= Today()
Rgds
Anand
Hi,
I'd rather use the condition in every expression within that chart using set analysis. Calculated dimensions perform really poor with a few dozens of thousands of records, whilst set analysis performs noticeably faster:
Sum({< [Mat Date] = {">=$(=Today())"} >} Sales)
I know that it takes a little bit more of coding, but it's worth spending your time here that the chart rendering slower for the user.
Hope that helps.
BI Consultant
code like below in back end
Load
field 1,
field 2,
.....,
[Mat Date]
from path
where [Mat Date]>=Today();
Hi,
1. If you are selecting any date values from any list box then use
GetFieldSelections( [Mat Date] ) >= Today( ) it works good
2. If you want to filter out the pivot table completely with the today( ) date
so use
If( [Mat Date] >= Today(), [Mat Date] ) in Dimension
HTH
Rgds
Anand
Hi Guys
Similiar issue I have a Crosstable load with a field as WorkStatus, I wish to only load where the WorkStatus is NOT Weekend,
I have tried this on a table box as
GetFieldSelections( WorkStatus )<> 'Weekend'
But its not working , can anyone help me please ?
Thanks
Hi,
Do you mean a CROSSTABLE LOAD in your script? Then you cannot refer to field selections, they do not exist in your script yet, but you can use a WHERE clause
CROSSTABLE (Month, Value) LOAD ID,
Jan,
Feb,
Mar
FROM File.qvd (qvd)
WHERE WorkStatus <> 'WeekEnd';
Is that what you mean?
BI Consultant
Hi Miguel,
It is a Crosstbale load in the script, I have the GetFieldSelections in the Table box I am creating,
I tried your solution and again it says that "Field not found - <WorkStatus>" on the load !!!!
Thanks
A
Hi,
I'm missing something here. One thing is the LOAD script and another the charts we discussed in the original post. What do you want to get and where?
Please create a new thread with your issue and post some example application or data to reproduce the issue you are experiencing.
Regards.
BI Consultant