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
Dohaje
Helper I
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!

Snímek obrazovky 2022-09-06 150738.png

 

1 ACCEPTED SOLUTION

Hi again

something like that? 

onurbmiguel__0-1662741897068.png

creat this new measure please: 

 

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

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


View solution in original post

17 REPLIES 17
v-shex-msft
Community Support
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.

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.

onurbmiguel_
Super User
Super User

Hello Dohaje

Try to creat a new measure 

 

new_measure = [measure_card A] + [measure_card B]

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


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.

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) 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


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.

Hi again

Is it always the currente month and the previous? 

 

BR 

Bruno 

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


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. 

 

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


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


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. 

Hi again

Try to creat a card here all filters will interact. 

 

BR 

Bruno 

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


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?

Hi again , 

Can you share a example with dummy values? 

 

BR 

Bruno

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


Hi Bruno, 

 

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

Thank you.

 

BR

Kristýna

Hi Bruno, 

 

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

Thank you.

 

BR

Kristýna

Hi again

something like that? 

onurbmiguel__0-1662741897068.png

creat this new measure please: 

 

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

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


Hi Bruno, that is perfect! Thank you! 🙂

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.