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
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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Anonymous
Not applicable

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

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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