Forum Discussion

Aproksymacja's avatar
Aproksymacja
New Member
2 years ago

Proper Filter Plot for Index

HI!
I want to calculate an index in Power BI. I have this measure: Index_EUR_GALLON = DIVIDE( 'Fixed Formulas & Ingredient & Price'[Product_Price_EUR_GALLON], CALCULATE( 'Fixed Formulas & Ingredient & Price'[Product_Price_EUR_GALLON], FILTER( ALL('Fixed Formulas & Ingredient & Price'[Date]), 'Fixed Formulas & Ingredient & Price'[Date] = SELECTEDVALUE('Calendar'[MonthlyDate]) )) where

Product_Price_EUR_GALLON = SUMX( 'Fixed Formulas & Ingredient & Price','Fixed Formulas & Ingredient & Price'[LFA_Ingredient.Mass_Rate]*'Fixed Formulas & Ingredient & Price'[Price_EUR_GALLON])

Index is calculated properly.

 

When I want to plot the results I have line plot where on x axis I have 'Fixed Formulas & Ingredient & Price'[Date] on y I have calcuated Index. Table 'Fixed Formulas & Ingredient & Price'[Date] contains also column FormulaStartDate which informs us which formula was applied for which date.

Example. Product: [a,a,a,a,a,a,a,a,a], Date: [2020-01-01,2020-02-01,2020-03-01,2020-04-01,2020-05-01,2020-06-01,2020-07-01,2020-08-01,2020-09-01], formula: [1,1,1,1,1,3,3,3,3] FormulaStartDate:[2019-11-01,2019-11-01,2019-11-01,2019-11-01,2019-11-01, 2020-06-01,,2020-06-01,2020-06-01,2020-06-01]

 

I have two slicers one to select Baseline Date for Index, second to be able to see on the plot only values for one formula.   

When my baseline date is Jan2020 (I have seected based on ('Calendar'[MonthlyDate]) and when I filter FormulaStartDate using slicer to see on the plot dates assigned for FormulaStartDate 2020-06-01, nothing shows up.
I guess that's because we filtered out our baseline date.
How to solve this issue?

1 Reply