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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lascnet
New Member

CREATING A CALCULATED TABLE USING DIFFERENT TABLES (MATCHING FIELDS ISSUE)

Hi, hope you all ara doing well.

Here is an issue i´m facing when creating a calculated table in Power BI.

What i'm traying to do, is using a field from the table T_TEMP (MARKED IN BLUE) in orther to gather information from other table. However, when i´m trying to match this field (MARKED IN RED) with the field of the second table (MARKED IN BLACK), it seams that the match is not working because i´m gathering an incorrect value (in this case a date).

I would appreciate your experience to know if it is the correct way to match it.

Thanks.

 

<ORIGINAL QUERY>

 

T_BITACORA =
VAR T_TEMP =
GROUPBY('Bitácora de Solicitudes de Arrendamiento',
'Bitácora de Solicitudes de Arrendamiento'[Nombre del Solicitan],
'Bitácora de Solicitudes de Arrendamiento'[Origen],
'Bitácora de Solicitudes de Arrendamiento'[Created].[Año],
'Bitácora de Solicitudes de Arrendamiento'[Created].[Mes],
'Bitácora de Solicitudes de Arrendamiento'[Created].[Día],
"Fec_Min",MINX(CURRENTGROUP(),'Bitácora de Solicitudes de Arrendamiento'[Created]),
"Fec_Max",MAXX(CURRENTGROUP(),'Bitácora de Solicitudes de Arrendamiento'[Created]))

RETURN SELECTCOLUMNS(T_TEMP,
"SOLICITUD",[Nombre del Solicitan],
"AREA",[Origen],
"AÑO",[Año],
"MES",[Mes],
"DIA",[Día],
"FECHA_MIN",[Fec_Min],
"FECHA_MAX",[Fec_Max],
"FECHA_INI",
IF([Origen] = "Comité de Crédito" && [Fec_Min] = [Fec_Max],CALCULATE(MIN('Bitácora de Solicitudes de Arrendamiento'[Created]),FILTER('Bitácora de Solicitudes de Arrendamiento','Bitácora de Solicitudes de Arrendamiento'[Nombre del Solicitan]=[Nombre del Solicitan] && 'Bitácora de Solicitudes de Arrendamiento'[Destino]="Comité de Crédito" && 'Bitácora de Solicitudes de Arrendamiento'[Acción]="Creación")),
NOW()))
3 REPLIES 3
dax
Community Support
Community Support

Hi @lascnet , 

I am not clear about your requirement, if possible could you please inform me more detailed information(such as your expected output and your sample data (you don't need to upload real data, you could upload simple sample data))? Then I will help you more correctly.

Please do mask sensitive data before uploading.

Thanks for your understanding and support.
Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

edhans
Super User
Super User

You are going to have to post sample data and the expected result. See How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

The only assistance I can provide without that is ensure all of your data types on the columns you are joining are exactly the same. Dates won't join with a column that contains dates but is formatted ABC/123 (any) in Power Query, or text that looks like dates for example.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Greg_Deckler
Super User
Super User

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.