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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
tahechadv_2022
Helper II
Helper II

Problem displaying values of a measure with Sum() Treatas()

Guys,

I have the following measure:

Sum_Table2_Deactivated_Relationship_TREATAS =
    CALCULATE(
        SUM(teste_orcamento_realizado[valor_bruto])
        ,TREATAS(
            VALUES(teste_orcamento_2[ano_mes])
            ,teste_orcamento_realizado[ano_mes]
        )
    )
And that is the result on a card visual
tahechadv_2022_0-1705512359135.png

And that is the result on a bar visual:

 tahechadv_2022_1-1705512393778.png

Why is there this difference in the values?

The correct is the value: 363711.18

And the other value (226505.90) is WRONG.

 

How can I show the right value (363711.18) in the bar graphic?

 

* Both columns [ano_mes] (which means [year_month]) are DATE type

* There are no additional filters

1 ACCEPTED SOLUTION

I'm sorry, the problem was data quality it wasn't a problem with the measure itself.

 

View solution in original post

6 REPLIES 6
gadielsolis
Super User
Super User

Hello,

 

I would suggest check if the field "Month" you're using in the Y axis contains the dates that you have in the table "teste_orcamento_realizado". If so i would be great if you could share some screenshot of the model and the tables.

tahechadv_2022_0-1705519089802.png

the link is made between conta > conta and mes_ano > mes_ano

Daniel29195
Super User
Super User

is the card visual is filtered on january  same as the bar visual ? 

There is no filter.

so the value in the first image is showing the total,

however the value in the bar chart is showing the data only for january . 

so i dont think there is something wrong.

 

or am i missing something ?  

 

@tahechadv_2022 

I'm sorry, the problem was data quality it wasn't a problem with the measure itself.

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.