PowerPivot Filtering DAX Formula

themule1406

New Member
Joined
Oct 24, 2017
Messages
3
I have a table with invoices and revenue.

Invoice Revenue
A 200
B 600
A 500
C 400

The output I'm trying to get is the number of unique invoices less than 500. So this example, it would be one invoice, "C" for 400.

The DAX formula below, sees two distinct invoices ,"A" and "C".
Calculate(distinctcount([Invoice],filter(Table1,sum(Table1[Revenue])<500))H

How can I change my formula to get this to work as I hope.
<colgroup><col width="82" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2998;"> <tbody> </tbody>
<colgroup><col width="82" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2998;"> <tbody> </tbody>

 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Invoice <500:=IF([Sum of Revenue]<500,[Sum of Revenue])
 
Upvote 0
While this does appropriately filter, it does not sum. I tried to use SumX(Table1,if([sum of revenue]<500, [sum of revenue])) to force to sum, but it then reverts to sum 200 + 400.
 
Upvote 0
This should work....

Invoice <500 FIXED:=IF([Sum of Revenue]<500,[Sum of Revenue],SUMX(DISTINCT(Range[Invoice]),[Invoice <500]))
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,558
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top