Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Greetings,
For some reason unknown to me, in a Calculate function that I use to calculate an average, Power BI Desktop always returns an error as soon as I try to add a third filter. I tried placing the filters in a different order, but it's always the one placed third that has red underlining (appearing as soon as I start typing the first letter) and whose variable name is greyed out. Can you help me understand ? I have looked up the question online, but only found related things that didn't quite seem to have the same problem.
Here is my measure that works (and has been used in previous dashboards) :
Bezettingsgraad = CALCULATE(AVERAGE(Groups[Bezetting]), Groups[Status] = "Started" || Groups[Status] = "Ended", Groups[Group_Max_Participants] <> 0)
And here is the one with the third filter I want to add in, but that makes it all bug :
Bezettingsgraad = CALCULATE(AVERAGE(Groups[Bezetting]), Groups[Status] = "Started" || Groups[Status] = "Ended", Groups[Group_Max_Participants] <> 0, Groups[Periode] = 1)
==> The error returned is "The syntax for "Groups" is incorrect.
Solved! Go to Solution.
Bezettingsgraad = CALCULATE(AVERAGEX(FILTER(Groups,Groups[Periode] = 1),Groups[Bezetting]), Groups[Status] = "Started" || Groups[Status] = "Ended", Groups[Group_Max_Participants] <> 0)
idk but try third filter use in averageX
Bezettingsgraad = CALCULATE(AVERAGEX(FILTER(Groups,Groups[Periode] = 1),Groups[Bezetting]), Groups[Status] = "Started" || Groups[Status] = "Ended", Groups[Group_Max_Participants] <> 0)
idk but try third filter use in averageX
Thank you petrovnikitamai, this has worked!
However I am still confused as to why Power BI just won't let me have more than 2 filters with Calculate, whereas everywhere I look, it says there can be an infinite amount of filters.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
120 | |
110 | |
59 | |
57 |