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
ptk10636
Frequent Visitor

Ejecución total que muestra valores incorrectos

Estoy usando la siguiente función para calcular el total de 12 meses consecutivos de artículos.

Cuando todos los períodos se enumeran cada cosa funciona muy bien. Sin embargo, si filtro y falta un punto un MISTERIOSO "2" aparece en los datos.


CompRunning_alt de la casa de los 200o (en in
CompsCount de VAR (VAR CompCount)
CALCULAR (
DISTINCTCOUNT( 'Extract (Header)'[issueNumber]),
DATESINPERIOD (
'Extraer (Encabezado)'[Mes],
MAX ('Extraer (Encabezado)'[Mes] ),
-12,
Mes
)
)
devolución
CompCount

Todos los meses

AllMonths.JPG

Con missi

MissingMonths.JPG

1 ACCEPTED SOLUTION
ptk10636
Frequent Visitor

I was able to resolve the issue by adding a seperate date table and not use the date in the main table. I do not know why this fixed the problem or why PBI was putting a MYSTERIOUS 2 when it should have been Null or Zero. 

View solution in original post

3 REPLIES 3
ptk10636
Frequent Visitor

I was able to resolve the issue by adding a seperate date table and not use the date in the main table. I do not know why this fixed the problem or why PBI was putting a MYSTERIOUS 2 when it should have been Null or Zero. 

Ashish_Mathur
Super User
Super User

Hola

Asumo que Items es una medida que se calcula como "DISTINCTCOUNT" ('Extraer (Encabezado)'[issueNumber]). Si mi comprensión es correcta, ¿cómo puede agregar entradas de recuento distintos. Por su propia naturaleza, distinctcount no puede ser aditivo.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
parry2k
Super User
Super User

@ptk10636 muy difícil de decir sin mirar el archivo pbix, se puede compartir, eliminar la información sensible antes de compartir.

También como práctica recomendada, realice todo el cálculo basado en el tiempo mediante la dimensión de fecha, significa que debe agregar una dimensión de fecha en el modelo para que funcione.

aquí hay una entrada de blog que habla sobre cómo agregar una dimensión de fecha a su modelo.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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