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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
rcardenasbc
Frequent Visitor

Problem with dax measure and relation ship

Hello, I have a problem with some tables and I don't know how to solve it, the tables are

• A main GLS table containing all accounts and the department they belong to
• The DaxCalendar table by month
• The department table containing the department
• Two tables with the values ​​of the real amount, one (TReal) and the theoretical amount in the other (TPlan),
• And a table containing the department, account, month and comment (GLxDepartxMonth)

The relationship is direct between GLS, DaxCalendar, TReal, TPlan and department
GLxDepartxMonth has a relationship with GLS, DaxCalendar but it is not the main relationship with department

The problem is that, when I show the account, the real and theoretical amount per month and selected department and I put the justification, it is duplicated for each department.
This dax does not work for me, what can I do to request it?

Just1 =
CALCULATE(
    FIRSTNONBLANK(GLxDepartxMonth[Justificacion],BLANK()),
    GLxDepartxMonth[Departamento.Temp] = SELECTEDVALUE(Department[Departamento]) &&
    GLxDepartxMonth[MesTxt] = SELECTEDVALUE('DAX Calendar'[MesTexto]) &&
    GLxDepartxMonth[GL] = SELECTEDVALUE(AllGL[GL])
 
Thanks for the help
 
rcardenasbc_0-1718467343365.pngrcardenasbc_1-1718467373730.png

 

1 ACCEPTED SOLUTION
rcardenasbc
Frequent Visitor

I resolve the problem unsaing 

Just1 =
VAR DepartSelect = SELECTEDVALUE(Department[Departamento])
VAR MonthSelect= SELECTEDVALUE('DAX Calendar'[MesTexto])
VAR GLSelect = SELECTEDVALUE(AllGL[GL])
VAR Result = LOOKUPVALUE(
    GLxDepartxMonth[Justificacion],
    GLxDepartxMonth[Departamento.Temp], DepartSelect,
    GLxDepartxMonth[MesTxt], MonthSelect,
    GLxDepartxMonth[GL], GLSelect
)
RETURN  Result

View solution in original post

1 REPLY 1
rcardenasbc
Frequent Visitor

I resolve the problem unsaing 

Just1 =
VAR DepartSelect = SELECTEDVALUE(Department[Departamento])
VAR MonthSelect= SELECTEDVALUE('DAX Calendar'[MesTexto])
VAR GLSelect = SELECTEDVALUE(AllGL[GL])
VAR Result = LOOKUPVALUE(
    GLxDepartxMonth[Justificacion],
    GLxDepartxMonth[Departamento.Temp], DepartSelect,
    GLxDepartxMonth[MesTxt], MonthSelect,
    GLxDepartxMonth[GL], GLSelect
)
RETURN  Result

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.

Top Solution Authors