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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
rcardenasbc
Frequent Visitor

Problem with dax and matrix visual

I have a problem with the Matrix visual, and that is that the budget value is repeated in each line and that does not happen with current
The dax of Actual is: Actual =
var Value = SUM(Sap[Actual])
Var Result = if(ISBLANK(Value),0,Value)
RETURN Result

The budget dax is:
Budget =
Var Value = SUM(Budget[Budget])
Var Result = if(ISBLANK(Value),0,Value)
RETURN Result
Both tables are unit by a master named GLALL
What should I do to correct the error, the visual image as an example, thanks for the help.

rcardenasbc_0-1719881547885.png

 

 

1 ACCEPTED SOLUTION
hnguy71
Super User
Super User

Hi @rcardenasbc 

Repeated value likely is due to incorrect relationship with your master table and the budget table. Can you double check to make sure the relationship is corrected?



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

10 REPLIES 10
rcardenasbc
Frequent Visitor

The relationship between the GLALL table and the Sap and Budget tables is one to many as shown, how could you create a measure to solve the problem, the GLALL table is a reference of the Sap table where the key is the GL and the department.

 

rcardenasbc_0-1719934735814.png

 

@rcardenasbc 

Can you show the relationship betwen GLALL and Budget?



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Thanks Hnguy71, this is the relation ship between the tables

 

rcardenasbc_0-1719937655575.png

 

@rcardenasbc 
is presupuesto your budget table?

 

All your dimension attributes/fieldwell must come from the GLALL table. Can we double check that?



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Yes Hnguy71, the presupuesto is my budget table; GLALL Table es the Main table, GLALL is obtain from Sap Table, look, thanks a lot

let
Source = Sap,
#"Removed Other Columns" = Table.SelectColumns(Source,{"GL", "Cost element descr.", "CO partner object name", "Cost Center"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Other Columns",{{"Cost element descr.", "Descripción"}, {"CO partner object name", "Department"}}),
#"Removed Duplicates" = Table.Distinct(#"Renamed Columns"),
#"Added Custom" = Table.AddColumn(#"Removed Duplicates", "GL-Descripción", each Number.ToText([GL]) & "-" & [Descripción]),
#"Changed Type" = Table.TransformColumnTypes(#"Added Custom1,{{"GL-Descripción", type text}, {"Group", type text}, {"Orden", Int64.Type}, {"Departamento", type text}, {"KeyGLDepart", type text}}),
#"Removed Duplicates1" = Table.Distinct(#"Changed Type", {"Departamento", "GL"})
in
#"Removed Duplicates1"

Hi @rcardenasbc 

 

Can you screenshot and hover on your fieldwell on your visual? All of them should be coming from the same GLALL table:

Here's an example of a screenshot (but yours should say GLALL instead):

hnguy71_0-1719942611844.png

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Thanks Hnguy71, Here the information:

 

rcardenasbc_0-1719945065753.png

 

PREVIEW
 
 
 

hi @rcardenasbc ,

Your vendor/supplying plant and detail both needs to come from GLALL table. Since GLALL is a distinct/unique table using your SAP table as source, you should have both of those columns there as well.

Replace these two columns and your data should flow properly.

hnguy71_0-1719947316316.png

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
Ashish_Mathur
Super User
Super User

Hi,

You have to ensure that the fields which you rag to the row and columns of the matrix come from a third Dim table.  There should be a Many to One and Single relationship from the Actual/Budge tables to this third Dim Table.  Right now, it looks like the fields in your matrix are from the Actual table.

If this does not help, then share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
hnguy71
Super User
Super User

Hi @rcardenasbc 

Repeated value likely is due to incorrect relationship with your master table and the budget table. Can you double check to make sure the relationship is corrected?



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

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.