0
votes

I have a strange issue in PowerBI, and I'm wondering if there is a workaround. The problem seems simple, but maybe one of you geniuses can explain.

I have a table that displays Current Sales Forecasts, and Selected Sales Forecasts, and a slicer which impacts this table, called Quarter. Quarter contains "Current Version", and historical "versions" of sales forecasts.

Current Sales Forecasts should ALWAYS display the "Current Version Forecasts", and never change amounts, regardless of the Quarter slicer. So I've calculated it like this:

Current Sales = CALCULATE(SUM(Sheet1[Sales]), Sheet1[Quarter] = "Current Version")

If I select Quarter = "Historical Version P9" in my slicer, as seen below, -0.4 is correct. However, there are missing Promotions and the lower level values do not roll up to -0.4.

enter image description here

If I select "Current Version" in my slicer, NOW all of the promotions roll up. I always want these promotions to appear, though, since the Current Sales slicer needs to roll up correctly. Is there a way to do this in PowerBI?

enter image description here

Thanks everyone for your help!

1

1 Answers

0
votes

This is correct powerbi behavior. You just filtered out part of the rows/promotions based on the "Quarter". If you look at your table you can tell that you don't have Promotion Group XX in "P9 Version" (maybe there was no sale?), But that group has rows for "Current Version".

I don't know what your tables and relationships look like, but you can create a new table with all the "Promotions" in it, link to Sheet1, and use that new column in a visualization. You can, if you don't have many historical versions, consider adding measures for each version (like this one in your example). Then create a measure:

Switch (TRUE (),
SELECTEDVALUE ('Slicers' [Quarter]) = "P9", [P9_measure],
SELECTEDVALUE ('Slicers' [Quarter]) = "P4", [P4_measure],
SELECTEDVALUE ('Slicers' [Quarter]) = "P3", [P3_measure],
[MeasureForElse]
)