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
Syndicate_Admin
Administrator
Administrator

DAX formula to use if you are getting the same value from another field

Hello!

I need help figuring out which DAX formula to use if I'm going to get the value in the Cost Recog field with the same value as with the actual Cost. See the table below.

What I need is the cost recognition value and this is the same value as with the actual cost

ProjectActual CostCost Recollect
Project 1$2,534,248.23$2,534,248.23
Project 2$1,633,649.00$1,633,649.00
1 ACCEPTED SOLUTION
v-jtian-msft
Community Support
Community Support

Hi,@rsdet .
I am glad to help you.

According to your description, you want to create a DAX formula that allows you to compare the “Actual Cost” with the “Cost Recog” field and return the “Cost Recog” value when both values match. values match.
If I understand you correctly, you can refer to my test results below

You could create a calculate column
like this :

Cost_Value =

IF(

    [Actual Cost] = [Cost Recollect],

    [Cost Recollect],

    BLANK()

)


You need to make sure that these two values ([Actual Cost]  & [Cost Recollect])
are either measure or calculate columns.

vjtianmsft_0-1717034054751.png

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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

2 REPLIES 2
v-jtian-msft
Community Support
Community Support

Hi,@rsdet .
Has your problem been resolved?

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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



v-jtian-msft
Community Support
Community Support

Hi,@rsdet .
I am glad to help you.

According to your description, you want to create a DAX formula that allows you to compare the “Actual Cost” with the “Cost Recog” field and return the “Cost Recog” value when both values match. values match.
If I understand you correctly, you can refer to my test results below

You could create a calculate column
like this :

Cost_Value =

IF(

    [Actual Cost] = [Cost Recollect],

    [Cost Recollect],

    BLANK()

)


You need to make sure that these two values ([Actual Cost]  & [Cost Recollect])
are either measure or calculate columns.

vjtianmsft_0-1717034054751.png

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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




Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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