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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
krichmond
Helper IV
Helper IV

Need help with a DAX formula that looks at a field's value and adjusts the calculation accordingly.

Table Name = mv_perfex

 

I have a DAX field called "90 Day Date Designator" that assigns a true / false indicator based on a "Start Date" field. This works.

  • 90 Day Date Designator = IF(DATEDIFF(mv_perfex[startdate],TODAY(),DAY)<=90,"True","False")

 

I now need help creating a DAX field that leverages the "90 Day Date Designator" and does the following

  1. If the "90 Day Date Designator" field equals "True" than multiply the "Projected Paid Responders" and the value of "Projected Premium" multiplied by "Projected Paid Responders".
  2. If the "90 Day Date Designator" field equals "False" than multiply the "Paid Responders @100%" and the value of "Actual Premium" multiplied by "Actual Paid Responders".

 

Sample data can be found here: https://www.dropbox.com/s/jc9jzftpmzi7j2c/Sample%20Data%20For%20Community%20Post.csv?dl=0

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @krichmond 

 

The data you provide is a bit confusing. I've briefly simulated a few to hopefully match your situation.

vzhangti_0-1667459967366.png
Column:

90 Day Date Designator = IF(DATEDIFF(mv_perfex[startdate],TODAY(),DAY)<=90,"True","False")
Column = SWITCH(TRUE(),
[90 Day Date Designator]="True",[Projected Premium]*[Projected Paid Responders],
[90 Day Date Designator]="False",[Actual Premium]*[Paid Responders @100%]*[Actual Paid Responders])

vzhangti_1-1667460028485.png

 

Best Regards,

Community Support Team _Charlotte

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

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @krichmond 

 

The data you provide is a bit confusing. I've briefly simulated a few to hopefully match your situation.

vzhangti_0-1667459967366.png
Column:

90 Day Date Designator = IF(DATEDIFF(mv_perfex[startdate],TODAY(),DAY)<=90,"True","False")
Column = SWITCH(TRUE(),
[90 Day Date Designator]="True",[Projected Premium]*[Projected Paid Responders],
[90 Day Date Designator]="False",[Actual Premium]*[Paid Responders @100%]*[Actual Paid Responders])

vzhangti_1-1667460028485.png

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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