Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Waterfall chart based on dynamic slicer selectedvalue issue

Hi All, need help here.

 

I'm making a waterfall chart that's dynamic by slicer from two different tables (IndexMRF & IndexMRF COC) with the same structure as below. 

& I have slicers for both. 

I want to make waterfall with two of those selected MRF as category. 

* Forecast Period on Category is from TableNMI field.

I've tried implementing this code but it's not working.

Selected MRF COC = 
VAR ForecastPeriod1 = SELECTEDVALUE('IndexMRF'[Forecast Period])
VAR ForecastPeriod2 = SELECTEDVALUE('IndexMRF COC'[Forecast Period])

VAR temp_table =
    CALCULATETABLE (
        FILTER (
            'TableNMI',
            TableNMI[Forecast Period] IN {ForecastPeriod1, ForecastPeriod2}
        )
    )
RETURN
    SUMX ( temp_table, TableNMI[Value])

 

 

But if I change the variable manually, it works as expected. 


Note:

- I disabled the intercations between both IndexMRF with the Waterfall chart. 

- Table relationship:

 



Is it not possible to dynamically do this by slicer? Or is my code / setup wrong?
Kindly help to advise.

Thank you. 

 

No Replies