Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
Need some Power BI formula geniuses.
I have a formula which I have created in Excel and trying to replicate in Power BI, but unable due to SUMIF function not available.
General Gist of Formula.
1) Current Time Period is May.
2) I want to add - what I have invoiced for the last period + what I have orders for next period (see green)
3) See picture below how I currently have this executed in Excel, I cannot implement in Power BI.
Data below is dummy for sake of the exercise but I have a much larger data set in the background.
Please help!!
Solved! Go to Solution.
Managed to resolve it.
Calculation = (CALCULATE(SUMX('Table'[Orders]),FILTER(Table,Table[Period]<>"APR 2016")) + (CALCULATE(SUMX('Table','Table'[Invoiced]),FILTER(Table,Table[Period]="APR 2016"))))
Managed to resolve it.
Calculation = (CALCULATE(SUMX('Table'[Orders]),FILTER(Table,Table[Period]<>"APR 2016")) + (CALCULATE(SUMX('Table','Table'[Invoiced]),FILTER(Table,Table[Period]="APR 2016"))))
@stokesmcr - had this same issue the other day. This worked for me:
CALCULATE(SUMX('Table','Table'[Invoiced goods]+[Ordered goods]),FILTER(ALL('Table'),'Table'[Period]<=MAX('Table'[Period])))
Thanks should work for you. 'Table' is what ever your table/file name is.
Thanks,
Giles
Thanks for your help so far. How did you pass the time period requirement into the formula?
In my case - I want "Invoiced" for April and "Orders" for May + June.
Thank you, Michael
DAX formulas, which we use in Power BI have a little different logic. In your example, a think the best way is to use SUMX with FILTER function
SUMX((FILTER(<the name of your table>,"APR 2016"=<name column you want to compare>),<name of column you want to sum>)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
58 | |
56 | |
38 | |
29 |
User | Count |
---|---|
75 | |
62 | |
45 | |
40 | |
39 |