Why are my measures returning null in my MOLAP cube in SSAS? - ssas

I have a cube with a fairly simply structure:
My measurements are also very simple, I just have a sum and a count of the grades.
However when I try to deploy the cube, it returns null values for the measurements:
As you can see, I even had to enable show empty cells, otherwise it wouldn't even show any results and just state "No rows found. Click to execute query.". Even if I try to simply retrieve the student_id for example or any other column without using any measurements, I get the no rows found statement unless I toggle the "Show empty cells" button.
What could be the reason for this?
I checked if aggregation was enabled for all dimension and it was. Connections between the tables are also okay, I checked it one by one and even in practice you can see how selecting both from teachers and students works perfectly well:
It's also worth mentioning that previously the cube was working. I tried adding some calculations then removed them once I noticed that the cube wasn't working properly. Right now there are only measurements in the cube but it still doesn't work as expected.

Related

Why are my TABLEAU table aggregation attempts ignoring my filter?

See attached image. Via Coursera, I am new to Tableau so what I am attempting to do seems it should be rather simple to do but isn't (not intuitively so). I'm familiar enough with SQL to wrangle my way around subqueries and case statements and such, but Tableau feels far more clunky most of the time.
Screenshot of Tableau worksheet table
I simply want to aggregate the dollar amounts listed on the right, SUM'ed across each City partition. Each city has a number of properties that have already been purposely filtered out, based on their profit Rank (via calculated fields) being too low. I've tried all sorts of things, but *the issue I'm facing is that the closest I can get is that any SUM I do lumps in the properties that were filtered out despite the filter remaining in place on the Filter card *. (I think I got a Running_Sum to yield the correct city totals a couple of times, but I couldn't get it to only show a single row of the final value for each city.)
I've tried countless variations and combinations of Include, Exclude, Fixed, Case, If, some nested via one or more of them, some not nested at all, some within a single calculated field, some spread out across multiple calculated fields...and often getting errors regarding not being able to mix aggregates and non-aggregates, being required to use aggregates in LODs but not being able to do so with IF statements, etc. But again, the times I've been able to get it to "work" error-free, I get the SUM across all properties in the city..not just the ones in the 'INVEST' category that the filter suddenly ignores after any error-free modification attempts to what is seen here.
Any help regarding this specific issue would be greatly appreciated, but a more general understanding of how to keep filters from being conditionally ignored by Tableau would be great. Sometimes the filter variable's second category would disappear as an option altogether while Tableau would still use rows from that category in the calculation. What gives? Thanks!

How to reference a primary key in Ms Access VBA behind a report

I would like to reference the Primary key on the continuous long summary report on my VBA code see below so that I get the correct results per total. The report was combined using domain functions, there is no ISSUE here in terms of performance all is perfect even if there are huge queries to do the actual calculations.
The report has grouped sales data for each salesman coming from unrelated tables & queries, thanks the domain functions has helped to construct this report accurately and with quality performance.
Problems:
I want now to have the final total for all salesmen, but if I reference the subtotal per each salesman, it only picks the value for the first salesman throughout, that is why I want to reference the primary which is based from the salesmen table and visible on the report. On the report I’m using this code below on-load event:
VBA Code
Me.txtsalestotal = Me.finalTotal
I'm putting the code above behind the report, but it keeps on picking the same value for one salesman to all salesmen, that's I why a primary key referencing is required here.
I think if I can be helped to know how to reference the primary key (which is Visible on the report) on the above code, then it will sort out this problem for good.
Here is my well researched answer to this problem:
Because of the domain functions that were used to summarize the report, then the sum function is now rendered irrelevant, meaning it can never be used on a non-bound control unless a control is bound directly to the record source in this case a query.
Solution
(1) Create a new control from any of participating tables with the correct data type in this numbers
(2) Include this control as part of the main record source query, the one which supplies the main data to the report in question.
(3) In the main report assign this control with the un-bound calculate value as its record source, Ms Access will treat it as a normal native control like any other queries controls.
(4) Then to have the cumulative figures just apply the in-belt report running total and hide it
(5) Finally add another control in the page footer and then reference the hidden control, problem solved!

Microsoft Access Table Shows Up Blank, But Query Correctly Pulls Data From Table

I am having an issue with my Microsoft Access database. One of my tables looks completely blank, but it has 11632 records listed in the bottom. Take a look at this screenshot. Though the table shows up blank, when I run the query it pulls the correct data from this table, so I know the data is there, it is just not appearing for some reason. I have tried on Access 2013 and 2016 on a different computer, and both have the same effect. I have also tried compacting and repairing, and also exporting the table but the file it exports to also appears blank, aside from the field names. Any ideas on what I could try?
Thanks!
Turn your import into a 2 step process (or more...). Write it raw into a scratch pad table. Then fire an append query, that has the appropriate criteria to result in only valid records going into the final table.
This isn't unusual at all given that some outside data sources may not have the controls to prevent bad records. Sometimes one must "wash" the data with several different query criteria/steps in order to filter out the bad guys.

measure not showing data after calculations created

I have my cube build and everything processed. Before i made any measures on my FactSales table all the data was showing in the browser when i dragged and dropped the measures. But when I made calculations on that Fact table it didn't show any data. I check in the dsv by browse data and its showing the data there. I also went and processed full in SSMS and did see all the rows being processed in both FactSales and FactSales1(where the calculation is) with the same amount of rows. But still no luck
Can anyone tell me how i can resolve this?
If you look at the calculations tab and flip to Script view does your MDX script start with CALCULATE? Removing that line will cause the behavior you describe.
If you do have CALCULATE then post your entire MDX script here or try commenting out each section until you find the culprit.

How to display filtered data rows as a tooltip in Tableau Public?

Noob here, I have a table with different entries (rows) per different (repeating) regions.
I'd like to be able to display the data rows filtered - matching that particular region thanks - so I get those particular fields related to each region as a tooltip on a map. (I know how to build the map)
Thank you
Just dragging the fields you want to Details or Tooltip is not doing the trick?
Putting a measure on a shelf (other than filter shelf) includes that field in the visualization query results -- i.e. applies the chosen aggregation function to yield an aggregate result value for each partition of the data (as specified by the unique combination of dimensions)
Putting a dimension on a shelf (other than the filter shelf) also includes that field in the query results, but since the dimensions define how data rows are partitioned, it can affect the level of detail of the query. You'll notice this often as suddenly getting many more marks in your visualization after you add a dimension to a shelf. If you are familiar with SQL, dimensions define the fields that follow the GROUP BY keyword.
EDIT
Thanks for the addition, #AlexBlakemore. I've never said dragging a dimension would not work, only that it wouldn't work as the OP wanted it to (basically the same as you're saying).
And though everything you said (above) is true, it's particularly not exact when it comes to maps. Yes, dragging a dimension will further partition the data, but it will not create additional marks on a map (unless it has also geographical properties). Rather, the tooltip will get the first occurrence of that dimension, and display data for that only. For instance, if you drag "Product" to details, and the possible values are "Bread", "Coffee" and "Milk", it will probably just show "Product: Bread", and the measures for "Bread" only. So yes, it will partition, but no, it won't create additional marks.
Back to OP problem. What I believe you want is a tool tip with all values of the dimension (in my poor example you'd like to see "Bread, Coffee, Milk"). Tableau does not have functions to aggregate strings yet, so it's hard to do so.
What I would suggest is to create a separate sheet, and just drag the dimensions and measures you want to rows. Then put it side by side with the map on a dashboard, and use the map as a filter. Then, when you click on a country/region/city, you'll see the data of that region on the other chart.
Refer to: http://kb.tableausoftware.com/articles/knowledgebase/creating-filter-actions-dashboards
or https://www.tableausoftware.com/learn/tutorials/on-demand/authoring-interactivity