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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Rachel_tsao
Frequent Visitor

Sum the value by filter is a "list"

Hi all,

Could you light me up how to create a measure which summary the value in [data] by only filter the type in the [list], for example in below 2 table [Data] & [List], I like to have a mearue= sum (A,E,Z)=10+15+30=55. I ask this question because the [list] will be different by time, so I wish to have a dynamic filter for my summary value. Appreciated for your help!

1. Data

TYPEValue
A10
B15
C5
D20
E15
Y20
Z30

 

2. List

TYPE
A
E
Z
1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Rachel_tsao - Test:

Measure 39 = SUMX(FILTER('Table (39)',[TYPE] IN SELECTCOLUMNS('Table (39a)',"Type",[TYPE])),[Value])

Deputy PBIX, page 39.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Rachel_tsao ,

You can try in. I think it works as a table column

 

measure = calculate(sum(Data[Value]), filter(Data, Date[Type] in values(List[Type])))

measure = calculate(sum(Data[Value]), filter(Data, Date[Type] in List))

measure = calculate(sum(Data[Value]), filter(Data, Date[Type] in {"A","E","Z"}))

Greg_Deckler
Super User
Super User

@Rachel_tsao - Test:

Measure 39 = SUMX(FILTER('Table (39)',[TYPE] IN SELECTCOLUMNS('Table (39a)',"Type",[TYPE])),[Value])

Deputy PBIX, page 39.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors