March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
168 | |
116 | |
63 | |
57 | |
50 |