cancel
Showing results for 
Search instead for 
Did you mean: 

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

Reply
jolulo
New Member

Tabla de clientes sin facturas en un periodo determinado

Buenas tardes!

Antes de nada decir que soy nuevo en el foro y en Power bi, por lo que os pido disculpas de antemano si no es el sitio adecuado para este Post. Paso a exponer mi problema sin mas dilacion:

 

Tengo un fichero de clientes, con los campos tipicos: Codigo de cliente, Nombre del cliente, Direccion, ... (logicamente la clave unica del fichero es el codigo de cliente). Y un fichero de facturas con tambien los campos tipicos: Nº de Factura (Clave Unica), Fecha de factura, Código de cliente (para relacionarlo con el fichero de cliente), importe factura... etc.

 

Logicamente la relacion clientes -- facturas en 1:n

Pues Bien: 

Necesito visalizar una tabla con la relacion de clientes a los que no se les ha emitido una factura en un periodo seleccionado por pantalla.

 

He probado con una medida y una nueva columna con un contador de facturas por cliente, pero en cuanto aplico el filtro por fechas, logicamente no me funciona.

 

No se si me he explicado bien

 

Alguna Idea?

 

Muchas Gracias por vuestra ayuda

 

Un Saludo

 

Jose Luis

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi Jose Luis,

 

Create a proper calendar table for your model (there's plenty of examples online of how to do this) and relate this to your Invoices table on Calendar[Date] 1:n Invoices[Invoice Date].

Create a basic measure in your Invoices table like this:

_noofInvoices = DISTINCTCOUNT(Invoices[Invoice Number])

Then add Clients[Client Name] into a table visual, and add a visual-level filter that is [_noofInvoices] = 0 or [_noofInvoices] is Blank.

Right-click on Clients[Client Name] in the Values section on the Visualisations pane and choose 'Show items with no data'.

Use Calendar[Date] for the page slicers to select the period to view.

 

I've attached a working PBIX at the bottom of this post.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
BA_Pete
Super User
Super User

Hi Jose Luis,

 

Create a proper calendar table for your model (there's plenty of examples online of how to do this) and relate this to your Invoices table on Calendar[Date] 1:n Invoices[Invoice Date].

Create a basic measure in your Invoices table like this:

_noofInvoices = DISTINCTCOUNT(Invoices[Invoice Number])

Then add Clients[Client Name] into a table visual, and add a visual-level filter that is [_noofInvoices] = 0 or [_noofInvoices] is Blank.

Right-click on Clients[Client Name] in the Values section on the Visualisations pane and choose 'Show items with no data'.

Use Calendar[Date] for the page slicers to select the period to view.

 

I've attached a working PBIX at the bottom of this post.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Hi Pete!

Thank you very much for your help!

I'm going to try it right now

 

Regards

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

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

Power BI Fabric Summit Carousel

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