Hi All,
I’m working on a P&L template . The P&L accountnames and numbers are coming from the financial system, but I had to add a few additional categories to them, called ‘DGM categories’. I have attached these in Query Editor and this all seems to be okay.
So for most of the P&L accounts (“Grootboek” in my report) I can use one single measure called “Actual” :
Actual = SUM(GrootboekMutaties[BedragValuta])
For the additional DGM categories I have created a few measure to calculate the values. One of the measures to calculate DGM OEM is this one:
DGM OEM =
ABS
(CALCULATE(
SUM(GrootboekMutaties[BedragValuta]), GrootboekMutaties[GrootboekRekening.1]= “8000”)) -ABS
(CALCULATE(
SUM(GrootboekMutaties[BedragValuta]) , GrootboekMutaties[GrootboekRekening.1] = “7000”))
This is giving me the result I expected when I add this measure to a Card Visual.
Then i use a Swith true statement, which should decide to return one of the DGM measures, or Actual:
Actuals PL complete =
Var CurrentItem = SELECTEDVALUE(GrootboekRekening[Grootboek])
RETURN
SWITCH ( TRUE(),
CurrentItem = “DGM OEM”, 1,
CurrentItem = “DGM 2USB”, 1,
CurrentItem = “DGM 3TH PARTY”, 1,
CurrentItem = “DGM OTHER”, 1,
CurrentItem = “DGM”, 1,
CurrentItem = “DGM %”, 1,
CurrentItem = “EBITDA”, 1,
[Actual])
Now this is where my problem is. The ''1" should be replaced by the DGM measure, but then it is returning an empty field. As long as I don’t use a measure, but “1” it will give me the number 1, so looks like the SWITCH TRUE formule itselves is working fine, but it is not working in combination with the measures.
Does anyone now what is wrong and how I can solve this?
Many thanks!