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.
[TABLE="width: 62"]
<colgroup><col width="82" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2998;"> <tbody>[TR]
[TD="width: 82, bgcolor: transparent"][TABLE="width: 62"]
<colgroup><col width="82" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2998;"> <tbody>[TR]
[TD="width: 82, bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
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,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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