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

Win a FREE 3 Day Ticket to FabCon Vienna. Apply now

Reply
JasonNahal
New Member

SUM a column with multiple filters from another column of the same table

Hi DAX Gurus and fellow Noobs,

 

 I am looking for help with the following Table:

ReferenceNameAmount
GST-40
Call out fee100
reimbursement400
GST-200
Call out fee60
GST20
Call out fee100
Meals50

 

I want to get the SUM(Table[Amount]) where Table[ReferenceName] = "GST" AND "Call out fee". What DAX formula could achieve this?

 

The above table is an extract from a SQL db and has 1000s of rows and 100s of different values in the ReferenceName column.

 

Any help will be much appriciated. thank you!

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @JasonNahal,

Depending on the way you setup your visialization you don't even need a measure to calculate this.

You can place the values in a visual and then filter the visu by the reference column. Other option is to use the reference column on the legend's of the charts that will give you a column line or bar for each of the references.

If you really want to use a measure you need to use something similar to this:

Gst = CALCULATE(SUM( TABLE[AMOUNT]) ; TABLE[REFERENCENCENAME] = "Gst")

Hope this helps.

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Anonymous
Not applicable

Hi @JasonNahal ,

You can directly use some default visuals in Power BI Desktop and add some visual-level filters to achieve this function (for example: table visual)

In addition , if you want to create calculated column/ measure through DAX , you can use the below similar formula to create it .

 default.JPG

If the above methods are not applicable in your scenario, please provide the related table structure and more sample data(exclude sensitive data).

create measure.JPG

Best Regards

Rena

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @JasonNahal ,

You can directly use some default visuals in Power BI Desktop and add some visual-level filters to achieve this function (for example: table visual)

In addition , if you want to create calculated column/ measure through DAX , you can use the below similar formula to create it .

 default.JPG

If the above methods are not applicable in your scenario, please provide the related table structure and more sample data(exclude sensitive data).

create measure.JPG

Best Regards

Rena

Thank you @Anonymous. Filters did the trick. 

MFelix
Super User
Super User

Hi @JasonNahal,

Depending on the way you setup your visialization you don't even need a measure to calculate this.

You can place the values in a visual and then filter the visu by the reference column. Other option is to use the reference column on the legend's of the charts that will give you a column line or bar for each of the references.

If you really want to use a measure you need to use something similar to this:

Gst = CALCULATE(SUM( TABLE[AMOUNT]) ; TABLE[REFERENCENCENAME] = "Gst")

Hope this helps.

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



thank you for responding @MFelix. using Filters for the visualization did the trick.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.