Forum Discussion
Dynamic P&L and possible relationship issue
BilancioFULL[Codice] 1-->* PdC Datev[PdC].
PdC Datev[Conto]1-->*Conti[Conto]
(i merged BilancioFULL[Sottocategoria] and PdC Datev[PdC] in 'Conti' afterwards just to make experiments with this issue, but won't work)
The problem is that i would like that when one of the categories in the P&L are highlighted, in another table should be shown the various accounts in that category. If CE2 stays without relationship, the second table won't of course filter anything.
as a follow up, the solution to this issue was switching the focus from the P&L visual to the other "accounts" table: there using an ad-hoc measure:
IF(
HASONEVALUE(),CALCULATE()
made the trick.Hope this can help other neophytes like me on this subject.
Br,Vittorio
3 Replies
- nightfall
Helper I
as a follow up, the solution to this issue was switching the focus from the P&L visual to the other "accounts" table: there using an ad-hoc measure:
IF(
HASONEVALUE(),CALCULATE()
made the trick.Hope this can help other neophytes like me on this subject.
Br,Vittorio - v-lionel-msft
Community Support
Hi nightfall ,
There seems to be no problem with the model, it may be a problem with the measure formulas.
- nightfall
Helper I
hello v-lionel-msft and thank you for your much appreciated hint!
I have tried changing the measures, the tables, etc, but without success.I am really struggling to get the logic behind, because if i activate the relationship the measures of the subtotals don't work anymore, so there might be somehow an implicit filtering that i am not getting.
e.g. the first subtotal that points to '_Base'[Reddito operativo] is:/* A - B del conto economico*/ CALCULATE ( '_Base'[Risultato d'esercizio], 'BilancioFULL'[Tipo] = "CE", 'Elenco'[Index] < 58 )
that calls [Risultato d'esercizio] which is
'_Base'[Ricavi] + '_Base'[Costi]
that in turn are:
Ricavi = CALCULATE(SUM(Conti[Saldo finale]), Conti[Natura] = "R", DATESYTD('Date'[Date]))and
Costi = CALCULATE(SUM(Conti[Saldo finale]), Conti[Natura] = "C", DATESYTD('Date'[Date]))*-1I am really getting crazy i have to admit 🙂
Thank you anyway for your comment.
Vittorio