5
votes
How to calculate a percentage over a dimension attribute and get correct aggregates?
Your main problem is that you are storing a measure in your dimension. You will keep running into issues with multiselect and or aggregation unless you store the measure where it belongs, namely in ...
3
votes
In star schemas, what should I do when a dimension has a date attribute?
Old question & I know the original posters are inactive, but since it came up in a Google search, I thought I'd add my thoughts.
1) Make Start_Date and End_Date regular, atomic attributes (...
2
votes
How to calculate a percentage over a dimension attribute and get correct aggregates?
Probably some MDX COUNT function would do the trick, but as the real fact table is somehow more complex and there is already a constant value of 1 identifying this specific rows among other related ...
2
votes
Accepted
How to handle NULL Dates in an "Accumulating fact table"
You say "null should be avoided in a foreign key column," but are these dates really FKs?
Most likely, these dates are just attributes of an order, and if the dates are unknown (and the ...
2
votes
Accepted
How to store high-dimensional (N > 100) vectors and index for fast lookup by cosine similarity?
The 2023 answer to this is to use the pgvector extension.
As of this writing, the number of maximum dimensions (defined here) is 16k.
2
votes
How to store high-dimensional (N > 100) vectors and index for fast lookup by cosine similarity?
I'm not aware of any existing modules that will do this for you. It will be hard to index this in a traditional sense of jumping to a specific and small part of the index which covers all possibly-...
1
vote
Difference between total table size and size of all pages in postgresql
The function pg_table_size() includes auxiliary relations (TOAST table, free space map, visibility map).
The number in pg_class.relpages should correspond to the result of pg_relation_size(), which ...
1
vote
Accepted
SSAS Cube Only Displays Total Values
The Customer dimension is joined to the measure group at a non-key granularity. If the Customer Name attribute isn't related to the attribute you join on then data repeats in reports. You need to do ...
1
vote
Accepted
In SSAS Parent-Child-Hierarchy how to use MembersWithDataCaption
My problem was I used a translation (german) and left the translation for MemberWithDataCaption empty. An other pitfall is a formatstring without a '*' does not work.
Answers:
Set ...
1
vote
How to sum measure value for all records between two dimension values
First you need two cube-dimensions because you cannot use one dimension on more than one axe of a MDX-select. You can use role-playing dimensions, that means there is only one "Week" dimension in the ...
1
vote
SSAS MD dimension joins to same table twice (but processing fails as attribute has 2 names for same ID)
You have a product dimension using all 3 tables. The dimension key is DimSellableItemVersion.SellableItemId and you can use SellableItemAvailability.Id two times as an attribute, once for the product ...
1
vote
Best approach for populating date dimension table
Here is a single SELECT query that uses the WITH RECURSIVE statement. It does not require loops, procedures etc.
A RECURSIVE SQL common table expression (CTE) is a query that continuously references a ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
dimension × 37data-warehouse × 15
ssas × 15
facttable × 12
sql-server × 9
dimensional-modeling × 9
cube × 5
star-schema × 4
postgresql × 3
database-design × 3
sql-server-2012 × 3
business-intelligence × 3
sql-server-2008 × 2
sql-server-2016 × 2
olap × 2
mdx × 2
mysql × 1
index × 1
security × 1
ssis × 1
schema × 1
primary-key × 1
table × 1
audit × 1
disk-space × 1