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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors