Reputation: 267
i have problem with tabular model where i often get same(max) values when browsing model by different categories.
for example if i try to browse paymentType table with measure columns from payment table measure columns have ok results, but if i try to browse rooms table with measure columns from payment table measure columns have same(sum of all) results.
I guess mistake is in the relation between payment table and renting table but i don't know how to fix it.
code in tabular model is not in english so i tried to translate the best i could.
thank you]1
Upvotes: 0
Views: 41
Reputation: 3798
You could change your definition of [UkupanIznosBezPopusta] to be as follows:
Pre-SSAS2016:
UkupanIznosBezPopusta =
CALCULATE (
<pre-existing measure logic>,
'iznajmljivanje'
)
SSAS2016 and later:
CALCULATE (
<pre-existing measure logic>,
CROSSFILTER ( 'iznajmljivanje'[uplataID], 'uplata'[uplataID], BOTH ) // I'm guessing on the key
// column here. These are
// the same name in both.
These are the general patterns for filtering from a many table to a 1 table, which is what you need to do here. In SSAS2016 and later, there is also the possibility to make the relationship between the two tables a bidirectional relationship, but I don't typically recommend this as the first thing to try.
Upvotes: 1