Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |