Forum Discussion

benjaminblume10's avatar
benjaminblume10
Frequent Visitor
2 years ago
Solved

Help with DAX Measure

Hello everybody,

 

i am try to setup a measure that sums up the amount of GL_ENTRY under specific conditions. 
Tha values should only be taken into consideration for the shortcutdimension 6 when the shortcutdimension 3 is empty. 
Otherwise some values are counted twice which should not be the case. I tried this measure.
I also tried with 

'G_L Entry'[ShortcutDimension Code 3] = BLANK()
and ISBLANK('G_L Entry'[ShortcutDimension Code 3] but the values where 
'G_L Entry'[ShortcutDimension Code 3] is not empty alsways get taken into the calculation.




GLAmount3 =
IF(
    Projekt_Dimensionswerte[Postenart] = "GL_Entry",
    CALCULATE(
        SUM('G_L Entry'[Amount]),
        FILTER(
            'G_L Entry',
            'G_L Entry'[G_L Account No_] >= "4000" &&
            'G_L Entry'[G_L Account No_] <= "7999" &&
            CONCATENATE(MONTH('G_L Entry'[Posting Date]), YEAR('G_L Entry'[Posting Date])) = CONCATENATE(MONTH(Projekt_Dimensionswerte[Datum]), YEAR(Projekt_Dimensionswerte[Datum])) &&
            (
                (
                    'G_L Entry'[ShortcutDimension Code 6] = Projekt_Dimensionswerte[ID] &&
                    'G_L Entry'[ShortcutDimension Code 6] >= "60100" &&
                    'G_L Entry'[ShortcutDimension Code 6] <= "60200" &&
                    'G_L Entry'[ShortcutDimension Code 3] = ""
                ) ||
                (
                    'G_L Entry'[ShortcutDimension Code 3] = Projekt_Dimensionswerte[ID] &&
                    'G_L Entry'[ShortcutDimension Code 3] >= "7000" &&
                    'G_L Entry'[ShortcutDimension Code 3] <= "7030"
                )
            )
        )
    )
)
Does someone know what I am doing wrong?
Aprreciate your help

2 Replies

  • never mind 

    it works nad i am just a little bit blind in the morning

    • DAX_Machine's avatar
      DAX_Machine
      Frequent Visitor

      Haha, never start the day without a coffee if you work with DAX XD