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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
sivarajan21
Post Prodigy
Post Prodigy

Dax to sum a value column based on two filters

Hi,

 

I have the below table :

sivarajan21_0-1693473242269.png

I need to sum the value column with respect to TargetType =0 and their corresponding Value Type.

My dax takes is as below:

Target Unit =
CALCULATE (
SUMX ( Target, Target[Value] ),
FILTER ( Target, Target[TargetType] = 0 )
)

 

This dax takes into consideration TargetType =0 but not Value Type. I have multiple Value Type such as Value_03,Value_02,Value_01 upto Value_12.

 

Could you please help me?

PFA raw excel file test.xlsx

Please let me know if you need further info!

 

Thanks in advance!

@Ahmedx @Greg_Deckler @grantsamborn @amitchandak @Sergii24 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

plse thr this

CALCULATE (
SUMX ( Target, Target[Value] ),
Target, Target[TargetType] = 0 && Target[Value Type] in {"Value_01","Value_02","Value_3","Value_12" } )

View solution in original post

3 REPLIES 3
sivarajan21
Post Prodigy
Post Prodigy

Hi Sir,

 

I have accepted it as a solution!

Thank you!

 

Ahmedx
Super User
Super User

plse thr this

CALCULATE (
SUMX ( Target, Target[Value] ),
Target, Target[TargetType] = 0 && Target[Value Type] in {"Value_01","Value_02","Value_3","Value_12" } )

Hi @Ahmedx ,

 

Amazing solution! thanks,

I will have a look and get back sir

 

Thanks

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Kudoed Authors