Forum Discussion

bgonen6899's avatar
bgonen6899
Regular Visitor
1 year ago

Dynamic variance calc between multiple financial scenarios

I have Seven different financial scenarios and I am trying to create a variance report to reflect the difference of two scenarios.

Example below:

Budget 24 (will be considered recent) because it was created after the Actual 2023 scenario.

Problem: My Scenario Prior measures do not fully reflected. (for example "Total Current Month potentail" measure return blanks

 

 

This is what I did:

1.I duplicated the slicer called "Scenario Recent" and renamed it "Scenario Prior"

2.I created inactive relationship between Scenario Prior and Scenarios2 (see below)

3.I created a dax formula (and this is where I am probably doing something wrong) to ignore the slicer "Scenario Recent" :

Values Prior = CALCULATE([Financial values],ALL('Scenarios Recent'),USERELATIONSHIP('Scenario Prior'[Scenario prior],Values_FIN[Scenario2]))

 

4. The"Values Recent" are pulling all measures of the 7 various scenarios and looks like below:

 

5. Budget 2024 measure looks partially like below:

Budget 2024 =
VAR CurrentItem = SELECTEDVALUE('Template4'[Account])
RETURN
SWITCH(
    TRUE(),
      CurrentItem = "Total Current month potential",
    CALCULATE(
        [Total Current month potenial],
        'Values_FIN'[Scenario2]="Budget 2024"
    ),,,,,,
CALCULATE(
        [Financial values],
        FILTER(
            Values_FIN,
            'Values_FIN'[Account] = CurrentItem && 'Values_FIN'[Scenario2] = "Budget 2024"
        )
    )
)

 

 

2 Replies