Filtered data Download using Active Admin Axlsx - ruby-on-rails-4

I am using active-admin-axlsx gem for excel download in Rails 4 app using active-admin.
A user can filter the data he views on the screen.
For example, if I have 10 records for user ABC and 5 records for user XYZ, I want to see records only for XYZ, I have the filters setup using the filters provided by active admin.
What I now want is to download only these records that I have filtered, in the excel rather than all the 15 records of both ABC and XYZ.
As of now the default behaviour is the excel download contains all the records, irresepective of the filters.
Please suggest how can I achieve only filtered data download in the excel
Many Thanks!

Related

Auto printing orders from sql using django/laravel

Is there any possibility to create app (django, laravel) - that would get data from database, table called orders and would automatically create pdf with data and download it?
Let's say, i've got 5 new orders, each for different address and different goods.
App should automatically create pdf and download for each of those 5 orders.
It could also be a react app getting orders from API.
Is this possible?
Thanks in advance.

Use power query to split csv file not multiple tables

I have used power query in the past, but am not an expert. I have a fold of logs that I want to import into PBI to create a dashboard. The log files have multiple tables on one sheet. (see folder in link).
How can I combine all sheets and then split them into 4 tables? The headings in all files are the same and can be found in the first column. They are: Report Generated, Panelist Details, Attendee Details, Other Attended.
Sample files

Oracle APEX - report download Internal Server Error

I have an interactive grid that displays over 250k records and has more than 30 columns. When I attempt to download the report in csv format, I get an Internal Server Error. How can I get around that? Is there a way to limit the number of records (I know that when there are fewer records it works fine)? Is there a way to automatically split report in two parts and download two separate files?
You can always add filters to your SQL Query, that way the end user downloads the data they really need.
For example:
1. Create some items like Select List.
Enter the proper filter in your SQL Query, as follows:
Include the items in Page Items to Submit.
Create a Dynamic Action to refresh your IG when the end user selects a different value for the items

PowerBI dashboard not importing all records

I'm new to PowerBI and am running into the following problem:
When creating a powerbi data import it doesn't import all the records from the database.
My setup is Azure SQL Database with 37138 records in a table.
Only 20001 records showing in my dashboard.
Any idea what the limitation could be?
I removed 3 varchar(max) colums. that increased my records from 2519 to 20xxx. My database contains 37138 records.
How can I retrieve all records?
You can import up to 5 million rows per table, up to 1 GB of data per dataset. But I have doubts it will be wise move. For 5 million rows you may want to consider direct query mode instead.
Please, provide more information about your import process and how you count the number of rows in both places, if you want to get an answer about that part of your question too.
I've found my problem.
I forgot I had a filter on a table which I forgot.
removed the filter and I see all the records!

How we can pass logged in user name to fetch data from database in PowerBI?

I need to show data only for logged in user in PowerBI. He is manager and in drop down i want to show list of employees under him. Also, only load for all employee whose manager is logged in user
We have more than 1 million rows for a day, so I want to hit database only for logged in username, Also, date parameter will be used from UI.
let
Source = Sql.Database("10.3.13.217", "TimeQSupport", [Query="DECLARE #StartDate date, #EndDate date,#UserName varchar(255);#(lf)SET #StartDate='" &DateBegin& "';#(lf)SET #EndDate='" &DateEnd& "';#(lf)SET #UserName='Gurminder'#(lf)execute usp_getTimeQeyDataPowerBI #StartDate=#StartDate, #EndDate=#EndDate, #UserName=#UserName#(lf)#(lf)"])
in
Source
Screen shot of powerBI views.
Are you viewing the report in PowerBI.com or using an embedded view of PowerBI?
From your question i assume you are using direct query, when using direct query to SQL Azure, you can get data filtered on the SQL server level using single-sign-on (as described in https://learn.microsoft.com/en-us/power-bi/service-azure-sql-database-with-direct-connect), this is only supported for SQL Azure, and only when using PowerBI.com (not PowerBI embedded).
Alternatively - you can switch to imported data (and refresh the data upto 8 times a day), this will allow you to set row-level-security on the dataset using PowerBI desktop (see https://learn.microsoft.com/en-us/power-bi/service-admin-rls)