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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
RobbeVL
Impactful Individual
Impactful Individual

Creating a Calculated table with multiple levels

Hi all,

 

A little help with creating this table would be nice.
I have quite a complex dataset, but I would like to complete this "simple" DAX measure. 

I want a Calculated Table with the following columns:

Unit ('BU'[BusinessUnit])
Year ('Date'[Year])
SalesRate (Measure)
SalesRateLY (Same measure, but showing the previous year)

Please take into account that the Last 2 columns would be based on measures refering to multiple columns.
How do I build up this measure ? 

Robbe


6 REPLIES 6
amitchandak
Super User
Super User

The information you have provided is not clarifying the problem for me. Please explain with an example.

You can share sample and sample output data.

Appreciate your congratulations.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
RobbeVL
Impactful Individual
Impactful Individual

I seem to get the correct result using the following:

SUMMARIZE(
              GENERATE ( 'Date'; 'Business Unit' );
               'Date'[Year];
               'Business Unit'[DIM_BUSINESSUNIT_ID];
                "Sales"; [SalesRate];
                "SalesLY; ???)

 

But how do I show the Sales of last year in this summarize?

 

Robbe

Hi @RobbeVL ,

 

As we know we cannot create dynamic calculated column like that. Could you please tell me what is your formula of your measure [SalesRate]? Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive for Business and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi 

I was afraid this wouldnt be possible that way.

In the table I would need for example this measure:

Rebitda = CALCULATE([Balance]; 'R-Account'[PL6]= "REBITDA")
      Balance = SUM('ZZ_PCABOOKING_CORE'[DEBIT])+SUM('ZZ_PCABOOKING_CORE'[CREDIT])

Rebitda_LastMonth = Is a measure refering to the previous month.
 
 
Expected result being: (could also just be a date, but aggregated on month level))

Year Month BU REBITA REBITA_LM
2019 01 VW 100  
2019 02 VW 120 100
2019 01 BV 100  
2019 02 BV 120 100
...        
 
 
thx,
 
Robbe
amitchandak
Super User
Super User

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Can you share sample data and sample output.

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
RobbeVL
Impactful Individual
Impactful Individual

Hi @amitchandak ,

I dont really know how to explain anymore. This is the way someone forwarded it to me. Seemed clear to me.
The result should be something like this:

BU is a Dimension, Year is from a dimension, but Sales is a measure based on 5+ tables with references to multiple other measures)
If I would drag and drop this in a matrix table, i'd get the result quite easy.

But how to "hardcode" this in a Calculated table? 


 

BU Year Sales SalesLY
Unit 1 2019 1000  
Unit 1 2020 2000 1000
Unit 2 2019 1500  
Unit 2 2020 2000 1500

 

Regards,

 

Robbe

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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