Pentaho Report Designer: How to create a chart based on an OLAP cube? - pentaho

Using Pentaho Report Designer, I can successfully display my OLAP cube's data as a table.
But when I want to display the same data as a chart, it always fail saying "CHART.USER_NO_DATA_AVAILABLE".
Actually, I don't really know what I should enter for category-column and value-columns. I tried:
category-column = [Area].[prefecture]
value-columns = [[Product].[Product.Product].[All Products].[productA]]
And any other variation I could think of, but no success. Any idea? Thanks!
My OLAP cube is a Pentaho Analysis: sales count for each product and prefecture.

Just use:
[Product].[Product.Product].[All Products].[productA]
You only need the extra square brackets around the entire fieldname if it's a formula.
Or pick the field from the dropdown.. then you know you have the right one!
If you're doing a timeseries xy, note you have to repeat the category column value as many times as the value column.
also make sure you have a series name too.

Related

Visualizing last refresh date in power bi

Is it possible to add a card in power BI that shows the last time the underneath dataset has been updated?
Many thanks!
You can create a blank query and use the following M query to create a single-cell table:
let
Source = #table(type table[Last Refresh=datetime], {{DateTime.LocalNow()}})
in
Source
And then you can use the Card visual and drag in the column to show it. You can rename the field to remove the default aggregation. (It doesn't matter since there is only one row of data anyways)
The value will be recalculated each time the data is refreshed.
you can achieve this by adding a calculated column (Refresh data Column) in the model with the formula =NOW()
Then add measure
Last Refresh Date :=MAX(Table[Last Refresh Column])
Since calculated columns are calculated only on model refresh - it will make sure the calculation is right.
The below code is working for me (for HK).
Add a column with the below formula
Last Refresh = FORMAT(UTCNOW()+TIME(8,0,0),"dd MMMM YYYY ttttt")
Depending on the location it's really confusing with all those functions..
Let me suggest you the workable one:
Go to the:
Query Editor
1.right click on the Queries body on the left side
2.new queries
3.Blank Queries
4.Paste the following formula by putting the right Server Instances and DB Name,
" = Sql.Database("Server\Instance", "Database", [Query="select GETDATE() LastRefreshDate from AnyTableName"])
It'll work out. And since it's pulling directly from the server,, you don't have to worry about choosing the right DateTimeZone functions in PowerBI.

GROUP BY over data in PowerPivot

In my PowerPivot I have a master data table which comes via an extract from system x. Now I want to be able to "GROUP BY" over a certain column from the same data. What would be the best approach here? There are more than 600.000 lines involved.
I have already tried following DAX query but it won't work:
SUMMARIZE('SAP extract', [cost element], sum('SAP extract'[val]))
Returns:
Query(1,, 47) Function SUMMARIZE expects a column name as argument number 3.
Kris,
I would suggest creating a new measure -- guessing from you question, that would probably be a simple SUM (see documentation here), something like:
=SUM(Sales[Amt])
This should be then automatically added to your currently active powerpivot table.
If you then want to group the data by anything, simply drag the dimension into the rows section and you should be able to see the aggregated sums sliced by the dimension you chose.
Hope this helps.

Display row with condition in Pentaho Report Designer

Assume I have one data set with following fields:
Name, Amount, Time, etc
How can I display only those records with Amount > 100, for example?
Since I need this data set for other report, I can't filter these records when I prepare data set.
I searched around, but couldn't find any answer. I will really appreciate if anyone can help.
By the way, I used Pentaho Report Designer 3.9.
Thanks a lot.
Yes, you can.
You have to find your Details Band - not Details Body -, within your Report Structure, and set up the Style Attribute visible the expression:
=if([Amount]>100;true();false())
Besides, if you want your summaries to consider only the shown data, you can also add an Open Formula function field, that would say:
=if([Amount]>100;[Amount];0)
And you'd summarize it at the end of the report.
Here's the link with the full example built to your situation.

Qlikview V10.4 Threshold and Drill down issue

I am using Qlikveiw version 10.4. I am trying to apply a threshold to Sales amounts in a table chart. Meaning, I want to display Sales above the threshold amount entered in the input box. But also keep the dimensionality of the drill down for the following drill down dimensions... Product Name>Category Name>Supplier Name. LineSalesAmount is an expression.
So I have a chart table...
Product Drilldown group as my dimensions
LineSalesAmount (expression)
Apparently in QV v11, there is a new feature added to the chart wizard called dimension limits but how do I apply this same functionality in QV 10.4?
You should be able to achieve this using set analysis.
If you create a variable called MinSalesAmount and add that to an input box, you should then be able to filter the data in the chart by using a set analysis expression like this:
SUM({<LineSalesAmount={'>$(=MinSalesAmount)'}>} LineSalesAmount)
The chart will then only display records where the LineSalesAmount is greater than the value entered in the Input Box which is mapped to the MinSalesAmount variable.
You can find extensive information on "Set Analysis" in the Qlikview Reference Manual (QlikView Reference Manual.pdf) and the online help within Qlikview.

Dynamic SSRS report

I had a problem in creating the Dynamic report in SSRS. My problem is:
In a table I have stored SQL scripts with the column SQLScripts. If you execute these SQL scripts you get different number of columns for each script.
My problem is, I have one report with buttons of these scripts, for example test1, test2...like that. If you press test1 button this should take the test one SQL script and should display the report with appropiate columns in that sqlscripts.
I can't create individual reports for each test report, they are plenty. Are there any options for me to solve this problem...
The only way I've been able to get this to work sofar is:
Each report has 2 datasets.
ReportData
DataHeaders
The "DataHeaders" need to have the proper name of the datafields in "ReportData". Be careful since SSRS replaces blanks and special characters with "_"
Now, create a table (or matrix) and drag the DataHeaders as the Columns of your report. (This should be a grouped column). If you run it at this point, you'll see all your columns without any data. Now comes the magic:
Create another report that takes a "DataField" parameter. Create another table or matrix within this report and set it's dataset property to be "ReportData". In the DATA cell for the table, set it to the expression =Fields(Parameters!DataField.Value).Value
Now go back to your first report. Right click and insert a subreport. Right click on the subreport and select "Subreport Properties". Under general, select the second report you created to be used as the subreport. Under parameters, select the DataField parameter and set its value to something like =Fields!DataField.Value
In my case I did some formatting in this expression to fix the above mentioned issue with spaces and special characters, since my stored procedure was initially used in ASP.NET and this was just a proof of concept.
Also in my experience the performance isn't great. In fact it was kinda slow, though I haven't had a chance to switch it to use a shared dataset, which I suspect would help a bit. Please let me know if you find a better solution.
I have not found a way to do this completely dynamically. Here is a similar question with some possible solutions:
How do i represent an unknown number of columns in SSRS?
You basically need to create a 'master dataset' from the other Datasets that are based on your multitude of SQL scripts first.The master dataset should contain the data to be presented in it's most simplistic form, i.e. in a simple list format.
Finally, go to the toolbar in SSRS and drag a 'Matrix' into the report. A Matrix table acts similar to a pivot table in Excel or a CrossTab query in Access that will display whatever's in the Dataset.