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
Anonymous
Not applicable

Comparing two dates in different tables and get minimum value

In my dataset, I have three tables "New", "Old" & "Date".

New & Old table both consists of columns "Observe Date" & "Value".

These both tables are connected to Date Table via "Date" column.

In the report, there will be a filter for Fiscal Year from "Date" Table. I want a measure such that if "Observe Date" is same in both "New"  & "Old"  table, then it must return minimum value for "Value" column among both tables. You can see the required result in the screenshot shared below:

Result.png 

Please find the .pbix file: 

https://www.dropbox.com/s/nn74uc4ac2palqj/Demo1.pbix?dl=0

Please Guide 

Thanks in Advance!

1 ACCEPTED SOLUTION

Hi @Anonymous

 

You may create below measures.Attached the sample file.

NewValue = CALCULATE(SUM(New[Value]))
OldValue = CALCULATE(SUM(Old[Value]))
Measure = IF(New[NewValue]>Old[OldValue],Old[OldValue],New[NewValue])

Regards,

Cherie

Community Support Team _ Cherie Chen
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

4 REPLIES 4
v-cherch-msft
Employee
Employee

Hi @Anonymous

 

Could you check the file again? I cannot find the three tables and observe date columns in it.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

can you please check now, I have updated the file link

Hi @Anonymous

 

You may create below measures.Attached the sample file.

NewValue = CALCULATE(SUM(New[Value]))
OldValue = CALCULATE(SUM(Old[Value]))
Measure = IF(New[NewValue]>Old[OldValue],Old[OldValue],New[NewValue])

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous

 

Could you tell me if your problem has been solved? If it is,kindly mark the helpful answer as a solution and welcome to share your own solution. More people will benefit from here. If not, please share more details for us so that we could help further on it.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
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.