<?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 Re: Dax  formula help in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729513#M1682</link>
    <description>&lt;P&gt;Hi there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DAX is wrong but you know this already. The comparison [value] &amp;gt; [value] will always return FALSE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please state in words (as an algorithm) the exact logic you want to implement and I'll then turn this into DAX. I understand this Color you need is going to be a calculated column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, you have to take into consideration RecordType as well because for different RecordTypes different "All Students" means exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2019 09:57:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-07-02T09:57:45Z</dc:date>
    <item>
      <title>Dax  formula help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/726456#M1570</link>
      <description>&lt;P&gt;I'm tring to compare the Avg DFS&amp;nbsp; for two different values found in a StudentGroup column to see which is larger.&amp;nbsp; They are all in the same table as well as column.&amp;nbsp; I'm comparing a value of a group of possible rows with one specific row.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 17:53:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/726456#M1570</guid>
      <dc:creator>mcdora</dc:creator>
      <dc:date>2019-06-27T17:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dax  formula help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/726640#M1573</link>
      <description>&lt;P&gt;Please rephrase the question.&lt;/P&gt;&lt;P&gt;Can you provide sample data (not a picture) and your desired result.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 22:55:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/726640#M1573</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2019-06-27T22:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dax  formula help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/727341#M1595</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;RecordType&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;School&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;StudentGrp&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;AvgDFS&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Legend&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Colors&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Chaparral Elementary&lt;/TD&gt;&lt;TD&gt;White&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Actual&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Chaparral Elementary&lt;/TD&gt;&lt;TD&gt;Hispanic or Latino&lt;/TD&gt;&lt;TD&gt;40.1&lt;/TD&gt;&lt;TD&gt;Actual&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Chaparral Elementary&lt;/TD&gt;&lt;TD&gt;Two or More Races&lt;/TD&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;TD&gt;Actual&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Chaparral Elementary&lt;/TD&gt;&lt;TD&gt;Economically Disadvantaged&lt;/TD&gt;&lt;TD&gt;14.8&lt;/TD&gt;&lt;TD&gt;Actual&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Chaparral Elementary&lt;/TD&gt;&lt;TD&gt;All Students&lt;/TD&gt;&lt;TD&gt;-21&lt;/TD&gt;&lt;TD&gt;Actual&lt;/TD&gt;&lt;TD&gt;Yellow&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Chaparral Elementary&lt;/TD&gt;&lt;TD&gt;White&lt;/TD&gt;&lt;TD&gt;35&lt;/TD&gt;&lt;TD&gt;Actual&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Chaparral Elementary&lt;/TD&gt;&lt;TD&gt;Two or More Races&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;TD&gt;Actual&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Chaparral Elementary&lt;/TD&gt;&lt;TD&gt;Hispanic or Latino&lt;/TD&gt;&lt;TD&gt;-8&lt;/TD&gt;&lt;TD&gt;Actual&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Chaparral Elementary&lt;/TD&gt;&lt;TD&gt;Economically Disadvantaged&lt;/TD&gt;&lt;TD&gt;-8.4&lt;/TD&gt;&lt;TD&gt;Actual&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Chaparral Elementary&lt;/TD&gt;&lt;TD&gt;All Students&lt;/TD&gt;&lt;TD&gt;-37.2&lt;/TD&gt;&lt;TD&gt;Actual&lt;/TD&gt;&lt;TD&gt;Yellow&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use a stacked bar chart to represent the numbers&amp;nbsp;(using colors) &amp;nbsp;by comparing the AvgDFS for all students to those in other student groups.&amp;nbsp; I tried above the following Dax expresssion but can't quite get it right.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Colors = if ([StudentGrp] in {"Economically Disadvantaged", "Hispanic or Latino", "White”, "Two or More Races"} &amp;amp;&amp;amp; [AvgDFS] &amp;gt; [AvgDFS] &amp;amp;&amp;amp; [StudentGrp] = "All Students","Blue",&lt;/P&gt;&lt;P&gt;[StudentGrp] in {"Economically Disadvantaged", "White","Two or More Races"} &amp;amp;&amp;amp; [AvgDFS] &amp;lt; [AvgDFS] &amp;amp;&amp;amp; [StudentGrp] = "All Students","Yellow","Red")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 15:00:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/727341#M1595</guid>
      <dc:creator>mcdora</dc:creator>
      <dc:date>2019-06-28T15:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dax  formula help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729513#M1682</link>
      <description>&lt;P&gt;Hi there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DAX is wrong but you know this already. The comparison [value] &amp;gt; [value] will always return FALSE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please state in words (as an algorithm) the exact logic you want to implement and I'll then turn this into DAX. I understand this Color you need is going to be a calculated column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, you have to take into consideration RecordType as well because for different RecordTypes different "All Students" means exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 09:57:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729513#M1682</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-02T09:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dax  formula help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729864#M1709</link>
      <description>&lt;P&gt;I want to compare the DFS from "All Students"&amp;nbsp; and the other Student Groups.&amp;nbsp; I created a visual and wanted to show the All Students in Yellow, if the DFS number for the other student groups&amp;nbsp; is higher than the All Students I would like it Blue.&lt;/P&gt;&lt;P&gt;If the DFS number is less than the All Students number, I'd like it R ed.&amp;nbsp; I even thought of either hard coding it or putting the All Students into a different table.&lt;/P&gt;&lt;P&gt;ex:&amp;nbsp;&amp;nbsp; If DFS from "White"&amp;nbsp; &amp;gt; DFS from All Students then BLue,&lt;/P&gt;&lt;P&gt;if DFS from Economically Disadvantaged &amp;lt; DFS from All Students, then Red.&amp;nbsp; DFS from All Students should be yellow&lt;/P&gt;&lt;P&gt;Hope I explained it right.&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Becky&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 15:03:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729864#M1709</guid>
      <dc:creator>mcdora</dc:creator>
      <dc:date>2019-07-02T15:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dax  formula help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729878#M1710</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want it to look like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 15:21:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729878#M1710</guid>
      <dc:creator>mcdora</dc:creator>
      <dc:date>2019-07-02T15:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dax  formula help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729891#M1711</link>
      <description>&lt;P&gt;What happens when you don't filter by RecordType? Do the averages get summed up for each StudentGrp?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 15:25:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729891#M1711</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-02T15:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dax  formula help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729899#M1712</link>
      <description>&lt;P&gt;I&amp;nbsp;have different graphs for each record type and that's where i filter it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 15:30:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729899#M1712</guid>
      <dc:creator>mcdora</dc:creator>
      <dc:date>2019-07-02T15:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dax  formula help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729949#M1713</link>
      <description>&lt;PRE&gt;-- This measure returns a color when only
-- one record type and one student group
-- is visible in the current context

[Student Group Color] =
var __studentGroup = SELECTEDVALUE( MyTable[StudentGrp] )
var __oneStudentGroupVisible = HASONEVALUE( MyTable[StudentGrp] )
var __oneRecordTypeVisible = HASONEVALUE( MyTable[RecordType] )
var __shouldDisplay =
	__oneStudentGroupVisible &amp;amp;&amp;amp; __oneRecordTypeVisible  
var __recordType = SELECTEDVALUE( MyTable[RecordType] )
var __avgdfs = SELECTEDVALUE( MyTable[AvgDFS] )
var __allStudentsAvgdfs =
	CALCULATE(
		MAX( MyTable[AvgDFS] );
		MyTable[RecordType] = __recordType,
		MyTable[StudentGrp] = "All Students",
		ALL( MyTable )
	)
var __color =
	switch( true(),
		__studentGroup &amp;lt;&amp;gt; "All Students",
			if(__avgdfs &amp;gt; __allStudentsAvgdfs, "Green", "Red"),
		__studentGroup = "All Students",
			"Yellow"
	)
return
	if( __shouldDisplay, __color )&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Jul 2019 16:10:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/729949#M1713</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-02T16:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dax  formula help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/744679#M2448</link>
      <description>&lt;P&gt;Thanks for the reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think i need to become more familiar with Power BI.&amp;nbsp; I still couldn't get it to work.&lt;/P&gt;&lt;P&gt;It's a table where more than one value is always visible.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 16:32:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-help/m-p/744679#M2448</guid>
      <dc:creator>mcdora</dc:creator>
      <dc:date>2019-07-19T16:32:46Z</dc:date>
    </item>
  </channel>
</rss>

