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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors