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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MiloDi
Frequent Visitor

Get wrong result when I have several rows and more than 1 values

Hello dear Community, 

 

Hope you're doing well.

I have a problem.

I have a list of flights that have an outbound date and a scheduled date.

Based on the flight status, I create a measure that will give me a weighting.

Then I isolate the minimum status for flights with an outbound or planned date greater than 2023 with a measure.

I transform this result by assigning it a status.

I have several values

But when I want to see by flight, for Flight 2 it doesn't give me the right value. It tells me it's 1 (Achieved) when it should be 2 since it doesn't have a date greater than 2023.

 

Can you help me?

Thank you

Capture9.PNGExample PBI 

1 ACCEPTED SOLUTION
v-zhouwen-msft
Community Support
Community Support

Hi @MiloDi ,

The table data is shown below:

vzhouwenmsft_0-1708928616517.png

Please follow these steps:
1. Use the following DAX expression to create a measure named ‘lsoler_min_statut >2023’

 

Isoler_min_statut >2023 = MINX(FILTER('Table1','Table1'[AllerDebutReel].[Year] > 2023 || 'Table1'[PlanificationDate].[Year] > 2023),[PonderationStatut])

 

2. Use the following DAX expression to create a measure named ‘min_statut’

 

min_statut = MINX(FILTER('Table1','Table1'[AllerDebutReel].[Year] > 2023 || 'Table1'[PlanificationDate].[Year] > 2023),'Table1'[Statut ])

 

3. Final output

vzhouwenmsft_1-1708928749797.png

vzhouwenmsft_2-1708928760836.png

Best Regards,
Wenbin Zhou
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-zhouwen-msft
Community Support
Community Support

Hi @MiloDi ,

The table data is shown below:

vzhouwenmsft_0-1708928616517.png

Please follow these steps:
1. Use the following DAX expression to create a measure named ‘lsoler_min_statut >2023’

 

Isoler_min_statut >2023 = MINX(FILTER('Table1','Table1'[AllerDebutReel].[Year] > 2023 || 'Table1'[PlanificationDate].[Year] > 2023),[PonderationStatut])

 

2. Use the following DAX expression to create a measure named ‘min_statut’

 

min_statut = MINX(FILTER('Table1','Table1'[AllerDebutReel].[Year] > 2023 || 'Table1'[PlanificationDate].[Year] > 2023),'Table1'[Statut ])

 

3. Final output

vzhouwenmsft_1-1708928749797.png

vzhouwenmsft_2-1708928760836.png

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

 

Hello @v-zhouwen-msft 

 

Thanks for the solution.
I had got lost in my measurements and wasn't looking at the problem from the right angle.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.