Forum Discussion
wrong dates in line chart
- 4 years ago
It's hard to guess. Buyt you could try something like this.
AP_TRIAL_BALANCE_OPENNING_BALANCE =
VAR Openning_Debit =CALCULATE (
[AP_TRIAL_BALANCE_DEBIT],
FILTER (
ALL ( '*Dates' ),
'*Dates'[Date] < MIN ( '*Dates'[Date] )
)
)VAR Openning_Credit =
CALCULATE (
[AP_TRIAL_BALANCE_CREDIT],
FILTER (
ALL ( '*Dates' ),
'*Dates'[Date] < MIN ( '*Dates'[Date] )
)
)
VAR Openning_Balance = Openning_Debit - Openning_CreditRETURN
CALCULATE(
IF (
ISBLANK ( Openning_Balance ) && MAX(fact table[date]) <= MAX('*Dates'[Date]),
0,
FORMAT(Openning_Balance, -0.000)
)
) - 4 years ago
Thank you very much it worked
CALCULATE(
IF (
ISBLANK ( Openning_Balance ) && MAX(fact table[date]) <= MAX('*Dates'[Date]),
0,
FORMAT(Openning_Balance, -0.000)
)
) - 4 years ago
This is the working Variab;e , Thanks ,
CALCULATE (IF (ISBLANK ( Openning_Balance ) && NOT ( ISBLANK ( COUNTROWS ( '*Dates' ) ) ),0,Openning_Balance))
It's hard to guess. Buyt you could try something like this.
AP_TRIAL_BALANCE_OPENNING_BALANCE =
VAR Openning_Debit =
CALCULATE (
[AP_TRIAL_BALANCE_DEBIT],
FILTER (
ALL ( '*Dates' ),
'*Dates'[Date] < MIN ( '*Dates'[Date] )
)
)
VAR Openning_Credit =
CALCULATE (
[AP_TRIAL_BALANCE_CREDIT],
FILTER (
ALL ( '*Dates' ),
'*Dates'[Date] < MIN ( '*Dates'[Date] )
)
)
VAR Openning_Balance = Openning_Debit - Openning_Credit
RETURN
CALCULATE(
IF (
ISBLANK ( Openning_Balance ) && MAX(fact table[date]) <= MAX('*Dates'[Date]),
0,
FORMAT(Openning_Balance, -0.000)
)
)
This is the working Variab;e , Thanks ,