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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
FabioN
Frequent Visitor

Object table compute columns

Hello all,

I would like to create a table object, based on many tables from the model, and add some computed columns.

 

ProductIDAverageConsumptionConsumption1Consumption2NumberOfIssues   
        

 

Tables are:

PRODUCTS

ProductId

AverageConsumption

 

USAGE

Date

Productd

NumberUsed

 

I attach Usage twice, so I can have two columns for the same product and compare different date ranges.

Consumption1 and Consumption2 are the sum of NumberUsed for that ProductId on two different data ranges.

 

Up to now, it works.

I would like NumberOfIssue to be (as in Excel): IF(AND(Usage1>AverageUsage;Usage2>AverageUsage);2;1) to count the number of periods that are above the average usage (I know, the 1 is wrong, but it is just an example!).

 

Is it possible to perform such calculation in a table object? How can I reference dinamyc columns that are modifed with date ranges?

Should I go with the creation of a new measure, and then add that to the table object?

It's the first time I work on such calculation, so please just provide me basic info if this is feasable and if it is the correct approach.

 

Thank you very much!

 

Fabio

2 ACCEPTED SOLUTIONS
Icey
Community Support
Community Support

Hi @FabioN ,

 

It is suggested to create Measures. Calculated columns or calculated tables won't be changed dynamically by slicers or filters on report pages.

 

 

Best Regards,

Icey

 

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

FabioN
Frequent Visitor

Hello, thanks to both your suggestions, and being a complete newbie to Power BI, I followed this Microsoft Training on DAX, that I suggest to everyone

https://docs.microsoft.com/it-it/power-bi/guided-learning/introductiontodax 

It is very easy to follow, and after that I was able to create all the measures I needed!

Thank you,

 

Fabio

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hi @FabioN ,

 

It is suggested to create Measures. Calculated columns or calculated tables won't be changed dynamically by slicers or filters on report pages.

 

 

Best Regards,

Icey

 

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

FabioN
Frequent Visitor

Hello, thanks to both your suggestions, and being a complete newbie to Power BI, I followed this Microsoft Training on DAX, that I suggest to everyone

https://docs.microsoft.com/it-it/power-bi/guided-learning/introductiontodax 

It is very easy to follow, and after that I was able to create all the measures I needed!

Thank you,

 

Fabio

Greg_Deckler
Super User
Super User

Tough for me to follow. If you are creating a table in a DAX calculation and need it to be fully dynamic then use ADDCOLUMNS.

 

If you have created a DAX table in the data model you can add columns just like a normal table. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

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