Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
The model has several queries where there are three that I need to match. First, a table of people containing ID+(yearmonth) as a unique ID but it is not connected to calendar as the table people has no date column; Second, a table containing salary by people (the same key that People's table) connected to People and Calendar; the third, Attendance connected by key to People and by date to Calendar. I need to get the sumproduct between salary and certain states of attendance by people, to get the ammount paid, and then, do the same but get the same attendance's states for the previous month.
To be more exact, these are the measures:
Its not a good idea to add columns using SUMMARIZE, see this article from SQLBI.
Instead, use ADDCOLUMNS, e.g.
BI_HC =
SUMX (
ADDCOLUMNS (
SUMMARIZE ( Personas, Personas[Key] ),
"BIHC", [Remuneración (Sin Horas Extras) Mes Ant] * [Operativos]
),
[BIHC]
)