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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
sergioquerido
Frequent Visitor

How to Sum a Measure in Two Tables with Different Data Segmentation

Hello,
I have the following dashboard (figure attached) to perform some projections and i would like to dynamically sum a measure that is available in two tables (2 projections for 2 different drills) with different data segmentation and interactions disabled between filters. For example, the highlighted variable [Total Distance] in the table 1 was filtered for [Date] = "23.08.2024", [Drill] = "Activ. + Passe Veloc." and is multipled for [Duration1] = "5" and in table 2 was filtered for [Date] = "23.08.2024", [Drill] = "Meinho 9x2" and is multipled for [Duration2] = "10".
Then,  the expected result should be 272,3 + 344,98 = 617,28.
What is the best approach for this case?


Projections.png

 

 

Thanks,

SQ

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

Thanks for lbendlin's concern about this issue.
Hi @sergioquerido ,

I am not sure how your source dataset is designed, below is my sample.

Below is my source data tables.

vdengllimsft_2-1729144023444.png

vdengllimsft_5-1729144053135.png

 

 

In projection table 2, use the fields in the three slicers to create the corresponding slicer tables.

Synchronize the slicers constructed from these slicer tables with the corresponding source slicers.

vdengllimsft_0-1729143638953.pngvdengllimsft_1-1729143779745.png

 

Creates a measure to be used to sum the same measure from two tables.

Sum of two measures =
VAR _measure =
    CALCULATE (
        [Total Amount],
        'Table'[Date] IN VALUES ( 'Slicer_Date'[Date] ),
        'Table'[Type] IN VALUES ( Slicer_Type[Type] ),
        'Duration'[Duration] IN VALUES ( Slicer_Duration[Duration] )
    )
RETURN
    [Total Amount] + _measure

 

Use a card visual to present this measure.
Set this card visual not to be filtered by the slicers in Projection Table 2.

This measure sums the same measure from both tables.

vdengllimsft_0-1729145223206.png

 

If my test results do not solve your problem, please provide sample data.We can better understand the problem and help you. 

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.


Please see the attached pbix for reference.

 

Best Regards,
Dengliang Li

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

2 REPLIES 2
v-denglli-msft
Community Support
Community Support

Thanks for lbendlin's concern about this issue.
Hi @sergioquerido ,

I am not sure how your source dataset is designed, below is my sample.

Below is my source data tables.

vdengllimsft_2-1729144023444.png

vdengllimsft_5-1729144053135.png

 

 

In projection table 2, use the fields in the three slicers to create the corresponding slicer tables.

Synchronize the slicers constructed from these slicer tables with the corresponding source slicers.

vdengllimsft_0-1729143638953.pngvdengllimsft_1-1729143779745.png

 

Creates a measure to be used to sum the same measure from two tables.

Sum of two measures =
VAR _measure =
    CALCULATE (
        [Total Amount],
        'Table'[Date] IN VALUES ( 'Slicer_Date'[Date] ),
        'Table'[Type] IN VALUES ( Slicer_Type[Type] ),
        'Duration'[Duration] IN VALUES ( Slicer_Duration[Duration] )
    )
RETURN
    [Total Amount] + _measure

 

Use a card visual to present this measure.
Set this card visual not to be filtered by the slicers in Projection Table 2.

This measure sums the same measure from both tables.

vdengllimsft_0-1729145223206.png

 

If my test results do not solve your problem, please provide sample data.We can better understand the problem and help you. 

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.


Please see the attached pbix for reference.

 

Best Regards,
Dengliang Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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