<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Creating a visual to have multiple condition to check if the criteria has been met. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-visual-to-have-multiple-condition-to-check-if-the/m-p/3650444#M141409</link>
    <description>&lt;P&gt;Hi, I am trying to create a visual using if statements in DAX. I never get to understand and how to properly explain what Im after but, Ill try my best.&lt;BR /&gt;&lt;BR /&gt;I want to create a visual table to check students exam results, and return a value to tell if that section passed or failed.&lt;BR /&gt;&lt;BR /&gt;If Student 1 = Math, History, Science is passed, and Student 2 = Math, History, Science is passed. Then Section 1 passed.&lt;BR /&gt;Else if any of student failed one subject, then Section 1 has failed.&lt;BR /&gt;&lt;BR /&gt;The table is this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;By using the table above, Im trying to calculate if Section 1 passed or failed like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be really great. I would love to know if this is possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im having trouble because this is texts, and not numbers. Im unable to calculate the result.&lt;BR /&gt;&lt;BR /&gt;Thank you so much everyone!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jan 2024 04:31:56 GMT</pubDate>
    <dc:creator>CarryASaw</dc:creator>
    <dc:date>2024-01-22T04:31:56Z</dc:date>
    <item>
      <title>Creating a visual to have multiple condition to check if the criteria has been met.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-visual-to-have-multiple-condition-to-check-if-the/m-p/3650444#M141409</link>
      <description>&lt;P&gt;Hi, I am trying to create a visual using if statements in DAX. I never get to understand and how to properly explain what Im after but, Ill try my best.&lt;BR /&gt;&lt;BR /&gt;I want to create a visual table to check students exam results, and return a value to tell if that section passed or failed.&lt;BR /&gt;&lt;BR /&gt;If Student 1 = Math, History, Science is passed, and Student 2 = Math, History, Science is passed. Then Section 1 passed.&lt;BR /&gt;Else if any of student failed one subject, then Section 1 has failed.&lt;BR /&gt;&lt;BR /&gt;The table is this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;By using the table above, Im trying to calculate if Section 1 passed or failed like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be really great. I would love to know if this is possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im having trouble because this is texts, and not numbers. Im unable to calculate the result.&lt;BR /&gt;&lt;BR /&gt;Thank you so much everyone!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 04:31:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-visual-to-have-multiple-condition-to-check-if-the/m-p/3650444#M141409</guid>
      <dc:creator>CarryASaw</dc:creator>
      <dc:date>2024-01-22T04:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a visual to have multiple condition to check if the criteria has been met.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-visual-to-have-multiple-condition-to-check-if-the/m-p/3651329#M141456</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="678105" data-lia-user-login="CarryASaw" class="lia-mention lia-mention-user"&gt;CarryASaw&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please follow these steps:&lt;/P&gt;
&lt;P&gt;Since I wasn't very clear about the categorization of sections in your description, I created an extra column of sections as shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;1.Create the metric and write the following expression:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;result =

VAR _count = COUNTX(FILTER(ALL('Table'),'Table'[Section] = MAX('Table'[Section])&amp;amp;&amp;amp;'Table'[Exam Result] = "Failed"),[Exam Result])

RETURN

IF(_count = BLANK(),"Passed","failed")&lt;/LI-CODE&gt;
&lt;P&gt;2.The result obtained is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If your Current Period does not refer to this, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Clara Gong&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 09:46:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-visual-to-have-multiple-condition-to-check-if-the/m-p/3651329#M141456</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-22T09:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a visual to have multiple condition to check if the criteria has been met.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-visual-to-have-multiple-condition-to-check-if-the/m-p/3655187#M141604</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;It worked.&lt;BR /&gt;Just a follow up question though, how do I add more filter?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I tried adding filter like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;result =

VAR _count = COUNTX(FILTER(ALL('Table'),'Table'[Section] = MAX('Table'[Section])
&amp;amp;&amp;amp;
'Table'[Exam Result] = "Failed"),

'Table'[Exam Result] = "Not Yet Submitted")

,[Exam Result])

RETURN

IF(_count = BLANK(),"Passed","Failed")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried adding the "Not Yet Submitted" to be also considered as failed but no luck.&lt;BR /&gt;&lt;BR /&gt;I tried to dabble with the code but DAX seems to find the results wrong even if I wrote it like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ExamsResult = 

Var _count = COUNTX(FILTER(ALL('Sheet1'),

'Sheet1'[Subject] = MAX(Sheet1[Subject])
&amp;amp;&amp;amp;
Sheet1[Exam Result] = "Passed"),[Exam Result])

RETURN
IF(_count = BLANK(),"Failed","Passed")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just tried to filter the passed instead, and reversed the return Failed if true, and Passed if false.&amp;nbsp;&lt;BR /&gt;It seems it doesnt work like I thought it would be.&lt;BR /&gt;It Resulted to this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;To make it clear, I want to add another filter to make the result show it like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;by using this new table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Im sorry, I am new about this. I hope I explained my new problem properly. Thank you very much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 00:16:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-visual-to-have-multiple-condition-to-check-if-the/m-p/3655187#M141604</guid>
      <dc:creator>CarryASaw</dc:creator>
      <dc:date>2024-01-24T00:16:35Z</dc:date>
    </item>
  </channel>
</rss>

