Page 1 of 2
Filter data Band using Total Functions
Posted: Wed Sep 14, 2022 4:51 pm
by paul.thomas
Hi ,
i am using desktop designer to design templates. consider I have a dataSource that uses SQL query to get the table from a PostgreSQL server of the column Name, organization and cash. I just want to show/filter the person with max cash in an organization on the data band. How is this logic Applied ? . I have used a groupby band using the organization column as the condition for grouping
i used to put Max(DataSource.cash)==DataSource.cash as expression inside the data band filter which used to work till 2022.2.5
after upgrading it to 2022.3.5 Max(DataSource.cash) returns only 0
Re: Filter data Band using Total Functions
Posted: Wed Sep 14, 2022 6:34 pm
by Lech Kulikowski
Hello,
We couldn't reproduce the issue on our samples.
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Re: Filter data Band using Total Functions
Posted: Thu Sep 15, 2022 6:57 am
by paul.thomas
i have attached a report template in this comment. Please try to output the row with max cash
Re: Filter data Band using Total Functions
Posted: Thu Sep 15, 2022 7:26 am
by Lech Kulikowski
Hello,
Please send us csv file also.
Thank you.
Re: Filter data Band using Total Functions
Posted: Thu Sep 15, 2022 9:16 am
by paul.thomas
please try this via desktop designer . i have attached the csv
Re: Filter data Band using Total Functions
Posted: Thu Sep 15, 2022 10:09 am
by Lech Kulikowski
Hello,
Your report is not working not in 2022.2.5, not in the 2022.3.5 version. Please use the following expression:
Totals.Max(ExampleData, ExampleData.filter)==ExampleData.filter
Thank you.
Re: Filter data Band using Total Functions
Posted: Fri Sep 16, 2022 5:07 am
by paul.thomas
i dont know why the report is not working in 2022.3.5 version as i have used that version of desktop designer to design it .
the code given above works but i think it returns the maximum of filter compared to entire data set. Its my mistake for providing such a data set. i shall attach new csv file where it has name cash and organization
please provide expression for maximum cash held by someone in a particular organization. Sorry for the inconvenience

- Capture.PNG (173.74 KiB) Viewed 2762 times
Re: Filter data Band using Total Functions
Posted: Mon Sep 19, 2022 11:45 am
by Lech Kulikowski
Hello,
The same result. You should use the following expression:
Totals.Max(ExampleData, ExampleData.Cash)==ExampleData.Cash
Thank you.
Re: Filter data Band using Total Functions
Posted: Wed Nov 02, 2022 9:48 am
by paul.thomas
Hi,
Sorry i was late to reply on this. but this expression looks for largest cash in the entire datasource then filters only them out. i wanted largest per department. not largest cash in the entire data source. The online designer works as intended when i use Max(exampleData.cash) ==exampleData.cash why isnt the same done here as well
thank you
Re: Filter data Band using Total Functions
Posted: Fri Nov 04, 2022 1:17 pm
by Lech Kulikowski
Hello,
> The online designer works
What do you mean about the online designer?
Thank you.