Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
LKBoldrino
Frequent Visitor

comparison external interest between two scenarios

Hi everyone,

I'm working on a Power BI report where I need to calculate the external interest (Aussenzinsen) for two selected scenarios and then compute the delta between them. Here is the setup:

  1. I have a table SzenarioKombinationen that contains different scenario groups.
  2. I have two slicers on my report page named "Scenario 1" and "Scenario 2". Both slicers use the same column Szenariogruppe from the SzenarioKombinationen table.
  3. I need to calculate the sum of external interest (Aussenzinsen) for the selected scenarios in each slicer and then calculate the difference (delta) between these two values.

    Here is a simplified version of my data model:

    • Table: STB_Monatswerte_MER_FIS

      • Columns: Stichtag, BucketDatum, Aussenzinsen, Szenario
      • Table: SzenarioKombinationen

        • Column: Szenariogruppe

          I have tried creating measures using SELECTEDVALUE and TREATAS, but I'm having trouble ensuring that each measure respects the correct slicer selection. Here is what I have so far for Scenario 1:

          MS_Aussenzinsen_Scenario1_Value =
          VAR _stichtag = SELECTEDVALUE(STB_Monatswerte_MER_FIS[Stichtag])
          VAR _year = YEAR(_stichtag)
          
          VAR _start_date =
              SWITCH(
                  SELECTEDVALUE(SlicerYears[Year]),
                  1, _stichtag,
                  2, DATE(_year + 1, 1, 1),
                  DATE(_year + 2, 1, 1)  // Default case
              )
          
          VAR _end_date =
              SWITCH(
                  SELECTEDVALUE(SlicerYears[Year]),
                  1, DATE(_year, 12, 31),
                  2, DATE(_year + 1, 12, 31),
                  DATE(_year + 2, 12, 31)  // Default case
              )
          
          VAR Szenario1 = SELECTEDVALUE('SzenarioKombinationen'[Szenariogruppe]) ?????
          
          VAR _sum_sen =
              CALCULATE(
                  SUM(STB_Monatswerte_MER_FIS[Aussenzinsen]),
                  STB_Monatswerte_MER_FIS[BucketDatum] > _start_date &&
                  STB_Monatswerte_MER_FIS[BucketDatum] <= _end_date &&
                  TREATAS({Szenario1}, STB_Monatswerte_MER_FIS[Szenario])
              ) / 1000
          
          RETURN _sum_sen

          How can I ensure that Power BI correctly distinguishes between the first slicer (Scenario 1) and the second slicer (Scenario 2) when calculating these measures?

          Thank you in advance for your help!

           

          LKBoldrino_0-1732033021044.png

           

1 ACCEPTED SOLUTION
LKBoldrino
Frequent Visitor

I solved the problem by using a second scenario table for the second scenario slicer. 🙂

View solution in original post

3 REPLIES 3
LKBoldrino
Frequent Visitor

I solved the problem by using a second scenario table for the second scenario slicer. 🙂

LKBoldrino
Frequent Visitor

StichtagBucketDatumSzenarioAussenzinsenBlz  
30.09.202430.09.2024Ist5,81220  
30.09.202431.10.2024co141220  
30.09.202431.10.2024co 20.11220  
30.09.202431.10.2024co forward11220  
30.09.202430.11.2024.co141220  
30.09.202430.11.2024.co251220  

 

Each BLZ can have multiple scenarios. Depending on which BLZ is selected, the external interest rates for Bucket Date > Stichtag must be calculated according to two arbitrary scenarios selected in the slicer. The delta between the scenarios should also be displayed. This means that the output matrix will look as follows:

Column header: Bucket Date Columns: Scenario 1 / Scenario 2 / Delta

Anonymous
Not applicable

Hi, @LKBoldrino 

 

Can you provide example data or sample files? And what you expect the output to be. There is sensitive data that can be removed in advance. How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.