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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Andersen123
New Member

Need to reference an active filter in a measure - complex reporting

Hi,

 

I am quite desperate, as I have been working for weeks to build a really complex report using PowerBI, any help is appreciated. I think I might have reached the limitation of the current software.

 

I have a full table with Material codes, Sales organizations and periods (those define the level of the forecast accuracy calculation), and for the values I have an Actual demand and Forecasted Demand column. In order to measure forecast accuracy, I have set up a Deviation custom column (it needs to be calculated on a product + sales org level), which takes the ABS(Actual-Forecast), which is later used in other calculations. This works fine and provides valid results if only looking for 1 period.

 

However, when looking at multiple, following periods (lets say period 3-5, but any combination is possible), I would have to first add up all the actual demand related to those certain filtered periods, and also add up all the forecasts, and then for each of these material + sales organization combination, take the difference between the two, to get the absolute deviation.

 

Therefore I have created a supporting table, containing material, sales organization and Actual, Forecast which would do this exercise, and it works very well when I just manually define the filter I need, like: Actual = CALCULATE(SUM(Full[Act]);OR(Full[Period]=2;Full[Period]=3)) but I would need to replace the second part with the results of a filter. Currently, I found no ways for this measure to be calculated based on selected filters. This is the only way the forecast accuracy could be calculated in the right way, maybe a workaround is possible, but we haven't found one.

 

Please look at picturs attached: I would like the second table to sum up the given way the values, by only taking the selected periods into account, NOT all and NOT a pre-defined one.dummy2.PNGdummy1.PNG

 

Any advise would be much appreciated,

Andersen

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @Andersen123,

 

Could you share a sample pbix file(with just some sample/mock data) which can reproduce the issue? So that we can do some tests on it, in order to better understand your scenario and find a solution. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading. Smiley Happy

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.