cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper I

## Wrong column totals in a matrix

Hi, I have a problem with a formula when using matrix. I have use two ways but no one is perfect. I need you to help me to mix two formules. If I use de Formule1 I get the result I want, but the column total is wrong, but if I use the second formula I don't have the desired result but the total is correct. How should I mix this two formules? thanks

Fórmula1

CALCULATE
(
DISTINCTCOUNT
(
Pagos[IdPersonaOrigen]
)
,
USERELATIONSHIP(
'1CalFCreacion'[Date]
,
ContratosServicio[FechaAlta]
)
,
USERELATIONSHIP(
Pagos[IdPersonaOrigen]
,
ContratosServicio[IdUsuario]
)
,
Pagos[CuentaContable] = "70510030"
,
FILTER(
ServiciosContratables,
ServiciosContratables[IdTipoServicio] = 5 || ServiciosContratables[IdTipoServicio] = 7
)
)

Fórmula2

COUNTX
(
Pagos
,
CALCULATE
(DISTINCTCOUNT(Pagos[IdPersonaOrigen])
,
USERELATIONSHIP(
'1CalFCreacion'[Date]
,
ContratosServicio[FechaAlta]
)
,
USERELATIONSHIP(
Pagos[IdPersonaOrigen]
,
ContratosServicio[IdUsuario]
)
,
Pagos[CuentaContable] = "70510030"
,
FILTER(
ServiciosContratables,
ServiciosContratables[IdTipoServicio] = 5 || ServiciosContratables[IdTipoServicio] = 7
)
)
)
Super User

write another measure like this

``Fórmula1 fixed = SUMX(VALUES('Date'[Day]),[Fórmula1]) ``

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors