Reply
rcardenasbc
Frequent Visitor
Partially syndicated - Outbound

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

Syndicated - Outbound

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

Syndicated - Outbound

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
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)