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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
AlexChampion
Frequent Visitor

What If Parameter - how to use in a calculated column?

Hi All,

 

In my PBI report, I have a table "dash_Monthly_7E" which looks like this:

AlexChampion_0-1630571749049.png

 

The calculated column "Month Start Date" has the following formula:

AlexChampion_1-1630571880960.png

 

The "As At Date" object is a What-If Parameter that the user can define when viewing the report.

 

I need the table to update the dates in column "Month Start Date" when a date value is entered into the What-If Parameter.

 

This currently isn't working, and the EOMONTH function is using today's date, instead of the value in the parameter.

 

I have read that this is because What-If Parameters cannot be used in calculate columns, which "Month Start Date" is.

 

So I think I understand the problem, does anyone know any workarounds please?

 

Thank you. 

1 ACCEPTED SOLUTION
AlexChampion
Frequent Visitor

I have managed to resolve this issue.

I simply recreated the table "dash_Monthly_7E" and replaced all of the calculated columns with measures. The measures are able to  use the What-If parameter in their DAX code and so it works now.

 

 

View solution in original post

1 REPLY 1
AlexChampion
Frequent Visitor

I have managed to resolve this issue.

I simply recreated the table "dash_Monthly_7E" and replaced all of the calculated columns with measures. The measures are able to  use the What-If parameter in their DAX code and so it works now.

 

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors