Forum Discussion

ShyamS's avatar
ShyamS
Frequent Visitor
2 years ago
Solved

Need help in Dynamically selection of column value.

In my power bi report I want to create a dynamic header which will show Quarterly forecast based A column value. I have a column called scenario having values ACTUAL, PLAN, DEC_FCST,MAR_FCST out of ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ShyamS ,

    I create a table as you mentioned.

    Then I create two calculated columns.

    Latest Forecast =
    VAR _Current =
        MONTH ( TODAY () )
    RETURN
        LOOKUPVALUE (
            'Table'[scenario ],
            'Table'[Date], DATE ( YEAR ( TODAY () ), _Current, 1 )
        )
    Next Month =
    VAR _Current =
        MONTH ( TODAY () ) + 1
    RETURN
        LOOKUPVALUE (
            'Table'[scenario ],
            'Table'[Date], DATE ( YEAR ( TODAY () ), _Current, 1 )
        )

    Then I use the Card visual and get what you want.

     

     

     

    Best Regards

    Yilong Zhou

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