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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

How to generate desire result based on several condition

Hello Guys, Hope you are doing well. 

I have one question that might need your professional experience to help. Kindly refer to the example below: 
I wanted to created a Dax condition where

if the sum of Amount by supplier name is more than 300 and the supplier scoring is higher than 60, then show "Potential", Else "No Potential"

nicksonteh_0-1660554170118.png

expected result will be

Supplier 1 and Supplier 4 will show "Potential", but Supplier 2 and Supplier 3 will show "No Potential"

 

The final result expecting will be (Below are example)

nicksonteh_1-1660554450730.png

 

 

1 ACCEPTED SOLUTION

Hi,

Thank you for your feedback, and please check the below and the attached pbix file.

 

Expected measure: =
IF (
    HASONEVALUE ( Supplier[Supplier Name] ),
    SWITCH (
        TRUE (),
        SUM ( Supplier[Supplier Score] ) >= 60
            && SUMX (
                FILTER ( RELATEDTABLE ( Invoice ), Invoice[Contract] = "Non-contract" ),
                Invoice[Amount]
            ) >= 300, "Potential",
        "No Potential"
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

5 REPLIES 5
Zach98
Frequent Visitor

Monitoring internal operations provides insights into the organization's strengths, weaknesses, and capabilities. It helps identify areas where the organization has a competitive advantage and areas that need improvement.

Monitoring the business landscape allows organizations to understand the external factors and trends that can impact their strategy. This includes analyzing market conditions, industry dynamics, customer preferences, competitive landscape, regulatory changes, and technological advancements.

 

Assessing the feasibility of the action plan helps determine whether the proposed timeline for executing the actions is realistic. It considers the complexity of the tasks, the availability of resources, and any dependencies or interdependencies among the actions. By ensuring a realistic timeframe, you can avoid setting unrealistic expectations or encountering unnecessary delays.

 

Reviewing the action plan helps track the progress of the planned activities. It allows you to monitor whether the actions are being executed as intended and if they are on track to meet the desired outcomes. This helps you identify any delays, bottlenecks, or deviations from the plan, enabling you to take corrective actions in a timely manner.

 

 

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

It is for creating measures.

 

Picture3.png

 

Expected measure: =
IF (
    HASONEVALUE ( Supplier[Supplier Name] ),
    SWITCH (
        TRUE (),
        SUM ( Supplier[Supplier Score] ) >= 60
            && SUMX ( RELATEDTABLE ( Invoice ), Invoice[Amount] ) >= 300, "Potential",
        "No Potential"
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Anonymous
Not applicable

Hi. Yes you are right. sincerely apologise for the confurison, supplier 4 should not be consider as "Potential" because it score lesser than 60. 
However, below are another condition i missed out. 

Based on the condition of Sum Amount by Supplier, I would like to add just those amount that the 'Contract' column show 'Non-Contract". 

After they sum the amount (just "Non-contrac" consider), if the contract is higher 300 and supplier score higher than 60, then "Potential", Else "No Potential". 

 

nicksonteh_0-1660555815748.png

Thank you so much for your kind assistance.

 

Hi,

Thank you for your feedback, and please check the below and the attached pbix file.

 

Expected measure: =
IF (
    HASONEVALUE ( Supplier[Supplier Name] ),
    SWITCH (
        TRUE (),
        SUM ( Supplier[Supplier Score] ) >= 60
            && SUMX (
                FILTER ( RELATEDTABLE ( Invoice ), Invoice[Contract] = "Non-contract" ),
                Invoice[Amount]
            ) >= 300, "Potential",
        "No Potential"
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Anonymous
Not applicable

yes! this is definitely what im looking for. thank you!

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.