Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be 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

Reply
Aishwaryazanpur
Frequent Visitor

create a measure with 5 columns based on on and 2 filter criterias and use this measure as a button

Dear all,

 

I am new to PBI, I want to create a measure based on one sinngle table, which involves summing 5 columns from the same table and 2 filter criterias from the same table) ..I tried suing combination of calculate, sum and filter with out success.

I want to use this created measure as a buttoon in PBI.

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @Aishwaryazanpur ,

 

To create a measure based on a single table, you can use the DAX formula SUMX to sum the values of multiple columns in a table.

MeasureName = SUMX(TableName, [ColumnName1] + [ColumnName2] + [ColumnName3] + [ColumnName4] + [ColumnName5])

vtangjiemsft_0-1698112844049.png

 

You can also add filter criteria to the formula using the FILTER function.

MeasureName = CALCULATE(SUMX(TableName, [ColumnName1] + [ColumnName2] + [ColumnName3] + [ColumnName4] + [ColumnName5]), FILTER(TableName, [FilterColumnName1] = "FilterValue1" && [FilterColumnName2] = "FilterValue2"))

vtangjiemsft_1-1698113008824.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

 

View solution in original post

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @Aishwaryazanpur ,

 

To create a measure based on a single table, you can use the DAX formula SUMX to sum the values of multiple columns in a table.

MeasureName = SUMX(TableName, [ColumnName1] + [ColumnName2] + [ColumnName3] + [ColumnName4] + [ColumnName5])

vtangjiemsft_0-1698112844049.png

 

You can also add filter criteria to the formula using the FILTER function.

MeasureName = CALCULATE(SUMX(TableName, [ColumnName1] + [ColumnName2] + [ColumnName3] + [ColumnName4] + [ColumnName5]), FILTER(TableName, [FilterColumnName1] = "FilterValue1" && [FilterColumnName2] = "FilterValue2"))

vtangjiemsft_1-1698113008824.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

 

Uzi2019
Super User
Super User

@Aishwaryazanpur 
Would you please elaborate what exactly you want to calculate I mean expected outcome. 
And how you want to display?
You can use excel to depict your scenario n share screenshot.

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.