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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Rabi
Resolver I
Resolver I

Getting All the values from one table to another using Dax Measure

Hi Everyone, 

Below is then dummy data model, how can i get the budget amount for GAS although there is no transaction in that account in  the General Legder using measure. 

Rabi_2-1702250893535.png

 

I have matrix visual, I have used account code and Name in rows from ACCOUNTS table, and below is my measure for getting budget, 

Budget = 
VAR Budget = CALCULATE (
    SUM ( budget table[Budget] ),
    Budget table[month]= MAX ( General Ledger[month] ),
    Budget table[Year]= MAX ( General Ledger[Year] ),
    ALL ( Budget table[Account Code])
)

can you please help me to get the result below:

Rabi_3-1702250915731.png

 

 

Thanks Verymuch for help !!

 

4 REPLIES 4
parry2k
Super User
Super User

@Rabi seems like the dim date table has a relationship with the account table. Why that is there?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Rabi why you have the following code:

 

  Budget table[month]= MAX ( General Ledger[month] ),
    Budget table[Year]= MAX ( General Ledger[Year] ),

 

If there is a date column, then add a date dimension and set the relationship of this date dimension with both GL and Budget table, and the measure should be a simple sum budget.

 

Also, in the output visual you have shown, you cannot have the same account code row twice until there is another column to make it a unique row.

 

See



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k , I tried creating relation from Dim DATE table with Budget table and GL table but it doesnt allow me. It says there will be ambiguty between Account table and DIM date

 

Hi @parry2k , I have those column in both General ledger and Budget table, I dint wanted to clutter the dummy model that is why i didnt include the date columns, I am using Fiscal Year and Fiscal Period as dates column in both of the tables.

 

 

Also my mistake in the output table, there is no duplicate acccount code.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.