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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jackson012
Frequent Visitor

To show all values from a table in matrix for all months

Hi, i have created a sample data and bi file to imitate my actual data set.

I have 2 tables, salestable and targettable.

 

My sales table have some data for certain months only, wherealese i've created and power queried my target table to apply my target value across the whole month.

 

I have a datetable to link the [invoice date] from the salestable and the [Start month date] in my targettable

 

However the target table's values is not show for all the months, which then makes the subtotal confusing.

jackson012_0-1699696680227.png

 

May refer to the data set and power bi file.

Excel data set file = https://1drv.ms/x/s!AvqyZM_RIenGg2zfzu18uhRx15Zj?e=c5D3Rp

Power bi file = https://1drv.ms/u/s!AvqyZM_RIenGg20OIt8Sphr61C9S?e=MxhluN

 

Expect result shall refer to the Excel data set file, "Expected result" tab

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@jackson012,

 

You're on the right track with a star schema. If you add a Customers dimension table, you'll get the expected result. You can create Customers with Power Query or DAX. Here's a DAX calculated table. You can adjust the logic as necessary (assumption is that all customers are in Salestarget).

 

Customers = DISTINCT ( Salestarget[Customer name] )

 

Add Customers to your star schema:

 

DataInsights_0-1699884808668.png

 

Use Customers[Customer name] in your matrix. If you use Customer name from one of the fact tables, you'll get rows from only that fact table.

 

DataInsights_1-1699884888681.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@jackson012,

 

You're on the right track with a star schema. If you add a Customers dimension table, you'll get the expected result. You can create Customers with Power Query or DAX. Here's a DAX calculated table. You can adjust the logic as necessary (assumption is that all customers are in Salestarget).

 

Customers = DISTINCT ( Salestarget[Customer name] )

 

Add Customers to your star schema:

 

DataInsights_0-1699884808668.png

 

Use Customers[Customer name] in your matrix. If you use Customer name from one of the fact tables, you'll get rows from only that fact table.

 

DataInsights_1-1699884888681.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.