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
ArquimedesP
Helper I
Helper I

Distincount wiht slicer

Hi guys, i have a two tables: 

 

Entradas (Which has "Año de Ingreso" Column)

Desembolsos (Which has "Nro_Operaciones" and "Año Desembolso" column)

 

I need a measure that do Distintcount of "Nro_Operaciones" base on a slicer "Año de Ingreso"

 

I did this measure: 

Operaciones Desembolsadas por Año =
VAR _A= SELECTEDVALUE(Entradas[Año Ingreso])
RETURN
CALCULATE(DISTINCTCOUNT(VW_BT_Desembolsos[Nro_Operacion]),FILTER(ALL(VW_BT_Desembolsos),VW_BT_Desembolsos[Año Desembolso]=_A))
 
It works well if I select only one year in my slicer, but when i have two years selected or none the result is blank.
 
What am i missing??
 
Thansk!
1 ACCEPTED SOLUTION
ArquimedesP
Helper I
Helper I

I found the reason, Measure will be: 

 

Operaciones Desembolsadas por Año =
VAR _A= VALUES(Entradas[Año Ingreso])
RETURN
CALCULATE(DISTINCTCOUNT(VW_BT_Desembolsos[Nro_Operacion]),FILTER(ALL(VW_BT_Desembolsos),VW_BT_Desembolsos[Año Desembolso]IN _A))

View solution in original post

1 REPLY 1
ArquimedesP
Helper I
Helper I

I found the reason, Measure will be: 

 

Operaciones Desembolsadas por Año =
VAR _A= VALUES(Entradas[Año Ingreso])
RETURN
CALCULATE(DISTINCTCOUNT(VW_BT_Desembolsos[Nro_Operacion]),FILTER(ALL(VW_BT_Desembolsos),VW_BT_Desembolsos[Año Desembolso]IN _A))

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.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

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