cancel
Showing results 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.

Helper I

## How to sum two cards

Dear all,

is it possible, to sum two cards? I have two cards, each one representing result from table.

- Card A sums a column from table A with date and personal filters

- Card B sums a column from table B with different date and personal filters

Filters from table A dont interact with filters from table B. That is correct. So at the end, after applying all the filters, I have result A and result B (and they change, when I change the filters), that I see on the cards A and B. Is it possible to make a card, that will sum results A and B? I tryed to make a metrics, that sums the column A and B, but it takes all the filters. I need to apply filters separately and then sum the two cards. Like in Excel, when you make two calculations and the sum up the two results. Is it possible?

Thank you!

1 ACCEPTED SOLUTION
Super User

Hi again

something like that?

``````New_Measure =
CALCULATE(
sum(Order_rewards[reward_mediated_for_validator]),
REMOVEFILTERS(Date_validated)
)
+
CALCULATE(
sum(Validated_per_day[reward]),
REMOVEFILTERS(Date_mediated)
)``````

Best Regards
BC

Best regards

Bruno Costa | Super User

Take a look at the blog: PBI Portugal

17 REPLIES 17
Community Support

Hi @Dohaje,

If these card visuals calculate based on different filter interactions, you can't direct calculate between them.
For this scenario, you need to manually write calculate expressions to restore the filter effects of two calculations then you can get the different them.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Helper I

Hi Xiaxin,

thank you. Could you please advise, how to manually write calculate expressions to restore the filter effects? I can google forward, but I dont know what for now :). Thank you.

Super User

Hello Dohaje

Try to creat a new measure

new_measure = [measure_card A] + [measure_card B]

Best Regards
BC

Best regards

Bruno Costa | Super User

Take a look at the blog: PBI Portugal

Helper I

Hi, thanks, could you please advise, how to define the measure_card A? In the card A, it is just a column from a table. Thank you.

Super User

hi again,

Is it a simple measure? Try:

1) # of A = sum(column A)

2) # of B = sum(column B)

3) # of total =sum(column A) + sum(column B)

Best Regards
BC

Best regards

Bruno Costa | Super User

Take a look at the blog: PBI Portugal

Helper I

Yeh, thats exactly, what I have. As you can see, column A is for September and column B for August. So the result of that measure wouldnt be 9650,- as I need, but 0, because the measure will apply all the filters. So I am looking for a solution, where I wouldnt sum the columns, but the cards, the numbers, they show wright now.

Super User

Hi again

Is it always the currente month and the previous?

BR

Bruno

Best regards

Bruno Costa | Super User

Take a look at the blog: PBI Portugal

Helper I

Hi, no, not always. The user might use the filters differently - same months too. In the person filter he can also choose more than 1 person.

Super User

HI again,

The filters on the top filters card A and the filters on the botton filters card B is that?

You have remove interation ?

BR

Bruno

Best regards

Bruno Costa | Super User

Take a look at the blog: PBI Portugal

Helper I

Hi, exactly, the red filters are for A and the blue filters on bottom are for B and I removed the interaction between the filters and of the filters to the table.

Super User

Hi again

Try to creat a card here all filters will interact.

BR

Bruno

Best regards

Bruno Costa | Super User

Take a look at the blog: PBI Portugal

Helper I

I dont understand - when all filters interact, I see only data, that corespond with them - so in the case on the picture, none. Is it possible somehow define in measure, that it shall take that number shown on the card?

Super User

Hi again ,

Can you share a example with dummy values?

BR

Bruno

Best regards

Bruno Costa | Super User

Take a look at the blog: PBI Portugal

Helper I

Hi Bruno,

if it is ok, there is a link to the file: https://sendy.link/9GKAWONN.

Thank you.

BR

Kristýna

Helper I

Hi Bruno,

yes, I would like to. How can I share? I cannot upload .pbix file directly here.

Thank you.

BR

Kristýna

Super User

Hi again

something like that?

``````New_Measure =
CALCULATE(
sum(Order_rewards[reward_mediated_for_validator]),
REMOVEFILTERS(Date_validated)
)
+
CALCULATE(
sum(Validated_per_day[reward]),
REMOVEFILTERS(Date_mediated)
)``````

Best Regards
BC

Best regards

Bruno Costa | Super User

Take a look at the blog: PBI Portugal

Helper I

Hi Bruno, that is perfect! Thank you! 🙂

Announcements

#### 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

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors