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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Fácil corrección en DAX, reemplazando el valor codificado en medida

Estoy tratando de obtener toda la lista de identificadores de mi tabla que tiene todas las versiones y por lo tanto mi código de abajo funciona perfectamente bien si mi Id espera 2 versiones, aquí tengo hardcoded max 2 pero en lugar de 2 si escribo DistinctCount(Table1[version]) no parece ser vinculante.

aunque puedo ver DistinctCount(table1[version]) devuelve el mismo valor.

¿Qué mal estoy haciendo aquí? Estoy tratando de usarlo en matriz visual con identificadores en fila y versión 1 y versión 2 como columnas

Medida que funciona bien:

Medidas

fue _max 2
devolución
countx(filter(summarize(Table, Table[Id], "_1",distinctcount(table[Version])),[_1] ?_max),[Id])

La tabla es algo como esto:

IdVersión
11
12
21
31
32

Medida que no funciona bien:

Medidas

var _max DistinctCount(Table1[versión])
devolución
countx(filter(summarize(Table, Table[Id], "_1",distinctcount(table[Version])),[_1] ?_max),[Id])

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@PoweeeBII , Probar como

Medidas

var _max Calculate(DistinctCount(table1[version]), allselected(table1))
devolución
countx(filter(summarize(Table, Table[Id], "_1",distinctcount(table[Version])),[_1] á _max),[Id])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@PoweeeBII , Probar como

Medidas

var _max Calculate(DistinctCount(table1[version]), allselected(table1))
devolución
countx(filter(summarize(Table, Table[Id], "_1",distinctcount(table[Version])),[_1] á _max),[Id])

Anonymous
Not applicable

Eres Súper!!!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors