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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
ShyamS
Frequent Visitor

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 which MAR_FCST is the lastest quarter forecast. so in my report header It should show MAR_FCST. Now in next month (June) business will push JUNE FORECAST (JUN_FCST) anytime in next quarter time is not fixed when they will push but as soon as we will receive June forecast (jun_fcst) in scenario column out header should automatically update to jun_fcst and for next forecast which is September it should update to sep_fcst. So , please help to guide me how to achieve this in power bi, as I am new to the power bi.

Thank you in advance for your quick response and valuable time.

1 ACCEPTED SOLUTION
v-yilong-msft
Community Support
Community Support

Hi @ShyamS ,

I create a table as you mentioned.

vyilongmsft_0-1716187221318.png

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.

vyilongmsft_1-1716187403584.png

 

 

 

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.

View solution in original post

3 REPLIES 3
v-yilong-msft
Community Support
Community Support

Hi @ShyamS ,

I create a table as you mentioned.

vyilongmsft_0-1716187221318.png

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.

vyilongmsft_1-1716187403584.png

 

 

 

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.

Dinesh97
Helper I
Helper I

Yes I understand your question!

 

In your case you can use this syntax it will work definitely:-

 

Testmonthname = format(Today(),"mmm")

 

If it works comment me.

 

Thanks 😊 

 

 

Thank you Dinesh for your reply.

In this case every month header will change but in my case as soon as new entry will come into scenario column it will update accordingly that also quarterly basis not every month. 

Let's say currently in scenario column latest one is MAR_FCST so it will display that till the new entry is not come into scenario column which will be JUN_FCST in next quarter. Then JUN_FCST will display till next quarter and then after that SEP_FCST will display and so on. 

But my issue is how we will automatically detect weither any new entry is made into scenario column and based on that change the header.

Please let me know if am not able to explain it properly. I will try to do it again.

Thank you for your response,🙏

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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