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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Step927
Regular Visitor

Create a measure in card that sum three different filtered values

Dear All,

 

I need to create a measure to display on a card that adds the value of three tables connected to a filter. Consider that each table is linked to its own filter and the filters are not synchronized with each other.

 

Many Thanks

 

PowerBi.png

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

Hi @Step927 ,

 

Thanks @BrunoTalini  for the quick reply and solution. I have another idea for you to consider:

(1) This is my test data. 

vtangjiemsft_0-1712557122500.png

(2) We can create three tables and then model the relationships.

Slicer1 = VALUES('Table'[squadra])
Slicer2 = VALUES('Table'[squadra])
Slicer3 = VALUES('Table'[squadra])

vtangjiemsft_1-1712557333721.png

(3)We can create a measure and then the result is as follows.

Measure = 
var _a=CALCULATE(SUM('Table'[Gol Fatti]),FILTER(ALL('Table'),'Table'[squadra]=SELECTEDVALUE('Slicer1'[squadra])))
var _b=CALCULATE(SUM('Table'[Gol Fatti]),FILTER(ALL('Table'),'Table'[squadra]=SELECTEDVALUE('Slicer2'[squadra])))
var _c=CALCULATE(SUM('Table'[Gol Fatti]),FILTER(ALL('Table'),'Table'[squadra]=SELECTEDVALUE('Slicer3'[squadra])))
RETURN _a+_b+_c

vtangjiemsft_2-1712557373885.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

3 REPLIES 3
v-tangjie-msft
Community Support
Community Support

Hi @Step927 ,

 

Thanks @BrunoTalini  for the quick reply and solution. I have another idea for you to consider:

(1) This is my test data. 

vtangjiemsft_0-1712557122500.png

(2) We can create three tables and then model the relationships.

Slicer1 = VALUES('Table'[squadra])
Slicer2 = VALUES('Table'[squadra])
Slicer3 = VALUES('Table'[squadra])

vtangjiemsft_1-1712557333721.png

(3)We can create a measure and then the result is as follows.

Measure = 
var _a=CALCULATE(SUM('Table'[Gol Fatti]),FILTER(ALL('Table'),'Table'[squadra]=SELECTEDVALUE('Slicer1'[squadra])))
var _b=CALCULATE(SUM('Table'[Gol Fatti]),FILTER(ALL('Table'),'Table'[squadra]=SELECTEDVALUE('Slicer2'[squadra])))
var _c=CALCULATE(SUM('Table'[Gol Fatti]),FILTER(ALL('Table'),'Table'[squadra]=SELECTEDVALUE('Slicer3'[squadra])))
RETURN _a+_b+_c

vtangjiemsft_2-1712557373885.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. 

Step927
Regular Visitor

Hi Bruno,

 

Thanks for your help.

In that case I need  a card with a measure that calculate the total = 91.

In my case I use only the table below. The measure Gol Fatti=  SUM('Stagione 2023-2024'[Gf]).

So the 3 tables visual use the same column from the same table but using different selection with filters.

The Column "squadra" used in the filter is in the same table 'Stagione 2023-2024.

Best Regards

 

Step927_0-1712440867721.png

 

 

BrunoTalini
Regular Visitor

Hi! How are you?

I think something like that could be solved with the HASONEVALUE() and HASONEFILTER() functions. I can't tell you more than that because I don't know the names of the columns and what the data model looks like. Maybe with more information I can help you a little more. By creating a measure with these functions, you may be able to achieve something good.

Best Regards!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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