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.
I am trying to make a custom measure. What I want is to:
I thought I could use a FILTER to do this but that won't work. I am getting an error telling me the syntax for the SUM function is incorrect (have not even squared the number yet).
SUM(FILTER(MyTable, MyTable[class] = "1")[columnToSelect])
Solved! Go to Solution.
Hi @Anonymous !
Create a new column using following DAX to have Sqr. values of your column;
SqrtColumn = SQRT(Table[Column])
Now you can use this new column in your DAX measure formula;
Class = CALCULATE(SUM(Table[SqrtColumn]), FILTER(Table, Table[Class] = "1"))
Regards,
Hasham
Hi @Anonymous !
You can use following DAX coede;
Class = CALCULATE(SUM(Table[Column]), FILTER(Table, Table[Class] = "1"))
Table is your table name & column is your column you want to sum.
Regards,
Hasham
How would one square all values before summing them?
Hi @Anonymous !
Create a new column using following DAX to have Sqr. values of your column;
SqrtColumn = SQRT(Table[Column])
Now you can use this new column in your DAX measure formula;
Class = CALCULATE(SUM(Table[SqrtColumn]), FILTER(Table, Table[Class] = "1"))
Regards,
Hasham
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 |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |