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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
karinafreitass
Helper III
Helper III

Function is not calculating

Hi guys,

Does anyone know how to tell me what might be contausing the following situation?

I created some functions to display the total values by category on the card.

 

Total Expedição =
CALCULATE(
       [Total Debito],
      FILTER(dimCentroCusto,dimCentroCusto[Função] = "Expedição")
       )
 
It seems to me that the value is not being calculated. 
For the other categories, the calculation was displayed correctly
Screenshot (196).png
 
Thanks so much
Karina
1 ACCEPTED SOLUTION
QQCFA
Frequent Visitor

Your code looks fine, try making sure relationship between your dimension and fact table is active and correct, ensure Expedição exissit in your fact table. . Also ensure spelling is correct of Expedição you are trying to use. I can see you created a measure for Total Administit.. maybe copy that code and replace with Expedição.

 

You can also try using Keepfilter instead of Filter function.

CALCULATE(
       [Total Debito],
      KEEPFILTERS(cloumnname and your filter needed)

View solution in original post

2 REPLIES 2
QQCFA
Frequent Visitor

Your code looks fine, try making sure relationship between your dimension and fact table is active and correct, ensure Expedição exissit in your fact table. . Also ensure spelling is correct of Expedição you are trying to use. I can see you created a measure for Total Administit.. maybe copy that code and replace with Expedição.

 

You can also try using Keepfilter instead of Filter function.

CALCULATE(
       [Total Debito],
      KEEPFILTERS(cloumnname and your filter needed)

I checked and there really was an inconcistence in the relationship. Thank you so much @QQCFA

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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