cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
JLambs20
Helper III
Helper III

Create a Matrix between two unrelated tables

Hello,

 

I have a column in a table that contains the row headers I need for a matrix.  However, for my columns, I need to have the numbers 1-30 (so, 30 columns) that correspond to a month.  This is just a generalization for each month so it doesn't need to be an actual existing month.  Anyway, I need those numbers as the column headers but they don't exist anywhere in my data (other than creating a table with GENERATESERIES to get my 1-30 values. Then the cells in the matrix would contain a formula to act as a "per day" value.  Here's an oversimplification:

JLambs20_0-1653615570348.png

 

Table 1 exists and it includes that column that contains the values I need for my Matrix row headers.  I need to be able to create the series of 1-30 columns and also write the DAX for values in the cells.  Since there are 30 days, each cell would divide the value by 30.

 

Hopefully that all makes sense!

 

Thank you!

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @JLambs20 ,

You can create a measure from two unrelated tables in DAX.  You can have something like

MyMeasure =
DIVIDE ( SUM ( Table1[Column] ), SELECTEDVALUE ( DaysTable[Day] ) )

 

The matrix will return an error if you put in the two fields from unrelated first but should be fine after adding the measure. If this doesn't work, please post  a sample data that we can copy-paste.






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

Proud to be a Super User!




"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Connect to me on LinkedIn || Need consulting? Hire me for a Power BI gig on UpWork.
Learn with me on YouTube @PowerBITambayan.

View solution in original post

2 REPLIES 2
JLambs20
Helper III
Helper III

I completely forgot the fact that measures will help out with unrelated tables! Gosh, that's quite the oversight on my part.  Thank you for your help!

 

danextian
Super User
Super User

Hi @JLambs20 ,

You can create a measure from two unrelated tables in DAX.  You can have something like

MyMeasure =
DIVIDE ( SUM ( Table1[Column] ), SELECTEDVALUE ( DaysTable[Day] ) )

 

The matrix will return an error if you put in the two fields from unrelated first but should be fine after adding the measure. If this doesn't work, please post  a sample data that we can copy-paste.






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

Proud to be a Super User!




"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Connect to me on LinkedIn || Need consulting? Hire me for a Power BI gig on UpWork.
Learn with me on YouTube @PowerBITambayan.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors