measure not showing data after calculations created - ssas

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.

Related

Why are my measures returning null in my MOLAP cube in 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.

SSAS Tabular Model - Add column to existing table

I am using VS2019 for SSAS Tabular Model development. Have imported a table from a CSV. The source CSV has undergone a change(new column has been added). When I process my table in VS2019, it gets processed successfully. However I am unable to see the new column introduced in source CSV. I went to Table properties and did a Refresh Preview but was not able to see the new column. Closed and re-started solution, re-processed the table but no luck! I remember in VS2017 we used to add the column by going into table properties and selecting the new column but things seem to be different in VS2019. Any help would be appreciated.
I'm assuming you used Get Data / Power Query to import the CSV. This unfortunately generates a Power Query Csv.Document function call that includes the number of columns when the query was generated. This parameter isn't exposed through the usual Power Query UI.
If you use the Advanced Editor or turn on the Formula Bar (view menu), you will see a parameter like Columns=10, was generated, usually in your Source step.
It currently seems safe to delete that parameter by editing the code - it will then always pull back all columns presented. Or if you prefer, you can edit the number of columns, as described in this blog post:
https://prathy.com/2016/08/how-to-add-extra-columns-to-an-existing-power-bi-file-which-using-csv-data-source/

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.

I am not able to get dimensions and fact values while browsing cube in SSAS 2005

I am new to SSAS. I have two tables, FactAnswers and DimDebit. one dimension and one fact. After creating cube when I try to browse dimensions and fact, I got nothing. I want to get AnswerValue from fact table and Debit values from Dim table. Everything you can see in this figure.
Please guide me, Where I am wrong.
Thanks
Have you processed the database yet? That is what actually "loads" data into it...deploying just builds the structure.
Also, are you trying to browse the cube via BIDS, SSMS, Excel, something else?

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.