Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
For the data set below, I am looking for a DAX formula that will sum each of the Line Amount fields by Document No_ and return the sum of Document No_ aggregates greater than $5,000.
The desired total would be $20,295.
I would also like a DAX formula that returns the distinct count of Document Nos aggregates greater than $5,000. In this example, returning 2 as the value.
Solved! Go to Solution.
AggSumOver5K = CALCULATE ( SUMX ( FILTER ( SUMMARIZE ( Table2, Table2[DocNo], "Aggregate", SUM ( Table2[LineAmt] ) ), [Aggregate] > 5000 ), [Aggregate] ) )
CountOver5K = CALCULATE ( COUNTROWS ( FILTER ( SUMMARIZE ( Table2, Table2[DocNo], "Aggregate", SUM ( Table2[LineAmt] ) ), [Aggregate] > 5000 ) ) )
Hope this helps,
David
AggSumOver5K = CALCULATE ( SUMX ( FILTER ( SUMMARIZE ( Table2, Table2[DocNo], "Aggregate", SUM ( Table2[LineAmt] ) ), [Aggregate] > 5000 ), [Aggregate] ) )
CountOver5K = CALCULATE ( COUNTROWS ( FILTER ( SUMMARIZE ( Table2, Table2[DocNo], "Aggregate", SUM ( Table2[LineAmt] ) ), [Aggregate] > 5000 ) ) )
Hope this helps,
David
It works. Thanks so much!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |