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
vitinho
Helper I
Helper I

Related Table grouping sum

I'm using some related tables to create a report, the left most table has the values sold, and the right most table has the information which I want to group by. Power bi isn't able to create the sum or the count by itself and don't give me the option to use the calculate function, Any one knows what is happening?
The DAX CALCULATE function is not avaiable when I'm trying to create a calculated column, only avaiable when creating a measure, is it related with my problem?

Relationship.png

8 REPLIES 8
LaurentCouartou
Solution Supplier
Solution Supplier

I assume you are using a DirectQuery mode and that is why you cannot use the CALCULATE function in a calculated column.

 

Anyway, the default measure does not return the expected results because of the propagation of filter: TCOM_PEDSAI filters TCOM_ITEDPS, which filters TCOM_PROSER.

 

You will have to write the relevant measure. The measure should look something like this: 

= CALCULATE( YourExpression
    , SUMMARIZE( TCOM_PROSER 
             , TCOM_PEDSAI[PEDS_COD]
    )
)

Hi, thanks for the help. But Summarize function don't appear for me either. any ohter idea what this could be?

I forgot to mention I activated the following options:

File > Options and Settings > Options > DirectQuery > Allo unrestricted measures in DirectQuery mode

@LaurentCouartouI believe that only makes those restricted functions available for measures, and @vitinho is trying to use them in columns. I don't think that option will help here.





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

Proud to be a Super User!




You are right, that is why I suggested writing a measure in my previous post.

This has been brought up in at least two threads now. Are you using import, or direct query? Some functions are limited in direct query mode.





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

Proud to be a Super User!




Direct Query

https://msdn.microsoft.com/en-us/library/mt723603.aspx





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

Proud to be a Super User!




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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.