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
erche3
Helper I
Helper I

Help> caculate value of items exsited in other filtered column

Hello Everyone 

I am new at POWER BI , and stuck in this issue for a while , I hope anyone could help me out 

here it is my stucking part in a simple way among many other relationships and cauclations  

I have a "volume" table , 

itemvolumesource
A1WEST
A2EAST
B3WEST
B4EAST
C5WEST
C6EAST

and a "filter" table

filter list
A
B
C

I want to sum the {volume} on the items exsited in filtered column {filter list}

I am using CALCULATE(SUM(volume[volume]),FILTER(volume,SEARCH(volume[Item]),VALUES(filter[filter list]),,0)>0))

this works ok when I only filtered one value , it goes error if I filtered "A" and "B" at the same time .

what is the correct formula should be used ?

 

I need to create a measure to caculate this ,  build relation between table will not help in my case

 

thanks

Eric

 

2 ACCEPTED SOLUTIONS
Zubair_Muhammad
Community Champion
Community Champion

HI @erche3

 

How about this MEASURE

Measure =
CALCULATE (
    SUM ( Volume[volume] ),
    TREATAS ( VALUES ( 'Filter'[filter list] ), Volume[item] )
)

Regards
Zubair

Please try my custom visuals

View solution in original post

@erche3

 

But If there is a relationship between tables,, a simple sum of Volumes should give you the answer as well

 

 

 


Regards
Zubair

Please try my custom visuals

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

HI @erche3

 

How about this MEASURE

Measure =
CALCULATE (
    SUM ( Volume[volume] ),
    TREATAS ( VALUES ( 'Filter'[filter list] ), Volume[item] )
)

Regards
Zubair

Please try my custom visuals

It works AMARZING!!! 

 

thanks a lot . I know I could put relationship in this example ,but it real case ,I could not since I need to combine this outcome with other caculations 

but this is definately what I am asking for !

 

thanks!!!

@erche3

 

Since both the tables have common field.....they can be joined easily I believe

 

See file attached

 

relate.png


Regards
Zubair

Please try my custom visuals

@erche3

 

But If there is a relationship between tables,, a simple sum of Volumes should give you the answer as well

 

 

 


Regards
Zubair

Please try my custom visuals

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.