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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Partycamel
Regular Visitor

Problems with two fact tables / sum is not formed per year

Hello,
I give the following example :
The goal is to set up a report with the following KPIs:
Sales per year
Vehicle stock per year
Sales per car (should be calculated).

In the fact table 1 (sales) are the following columns:

Partycamel_0-1668006352411.png

 

In the second fact table (vehicle stock) the following columns are included:

Partycamel_1-1668006554363.png

 

Then I have two dimension tables "Market-Key" and "Year":

 

Market key:

Partycamel_2-1668006791249.png

 

 

Year:

Partycamel_3-1668007626363.png

 

the data model looks like this:

Partycamel_4-1668007849117.png

 

Then Power bi should display in the report the totals from the two fact tables for the respective year. Unfortunately, the sum is only correct for the vehicle stock, but not for the turnover. Unfortunately, I can not show data for privacy reasons. But it seems at least that he adds the sales erroneously for all year and not for each year individually. 

*****

Update: I've checked the revenue results. The revenues are the same for each year per market and its exactly the sum of all three years together per market. Why did Power BI do that?  As already mentioned, the vehicle numbers are shown correctly for each market in each year.

I would be very grateful for your help!

 

1 ACCEPTED SOLUTION

Hi , @Partycamel 

According to your desciption, and the visual and filed you use in the picture. do you want wo create a measure to calcualte the sum of "vechile stock"?

Here is my test value:

vyueyunzhmsft_0-1668062428392.png

You can create a measure like this:

Measure = SUM('Vechile Stock'[Segmente1])+SUM('Vechile Stock'[Segmente2])+SUM('Vechile Stock'[Segmente3])

Then we can meet your need , the result is as follows , you don't need to create a column to calcuate the sum of three segments:

vyueyunzhmsft_1-1668062566489.png

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

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

4 REPLIES 4
mangaus1111
Solution Sage
Solution Sage

Hi @Partycamel ,

what measure are you using in your report for the revenue?

Partycamel_0-1668022770136.png

Hi @mangaus1111 ,

thank you for taking care of my problem. I think this is the sum as shown in the picture. Or can I see the measure to calculate the annual revenue somewhere else in power bi? I have not set a own measure.

Hi , @Partycamel 

According to your desciption, and the visual and filed you use in the picture. do you want wo create a measure to calcualte the sum of "vechile stock"?

Here is my test value:

vyueyunzhmsft_0-1668062428392.png

You can create a measure like this:

Measure = SUM('Vechile Stock'[Segmente1])+SUM('Vechile Stock'[Segmente2])+SUM('Vechile Stock'[Segmente3])

Then we can meet your need , the result is as follows , you don't need to create a column to calcuate the sum of three segments:

vyueyunzhmsft_1-1668062566489.png

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

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

Tank you for your support! I built a small easy sample. then I discovered a mistake. I had dragged the wrong fields into the chart filters. I had dragged the "year" field from the Car Park table into the "small multilpies" filter. The correct way is of course to take the "year" field from the "dim-year" table. Why didn't I notice this before? Your impulse to build a sample has helped me in any case. Thank you!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors