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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
hansaraneda
Helper I
Helper I

Value segmentation problem

Tengo la siguiente medida que me funciona bien al segmentar 1 año (ejemplo 2022), pero al segmentar 2 años (ejemplo 2022, 2021) me da error al leer datos, puede ser que el comando VALUES no sea el adecuado

 

% año actual2 = DIVIDE(CALCULATE(SUM(Consulta1[saldo_actual])),(CALCULATE(SUM(Consulta1[saldo_actual]),Consulta1[Etiqueta]= "Ingresos", Consulta1[year]= VALUES(Consulta1[year]), ALL())),0)

 

hansaraneda_0-1658842497491.png

 

hansaraneda_1-1658842537698.png

 

por favor tu ayuda

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@hansaraneda , use in

 

% current year2 = DIVIDE(CALCULATE(SUM(Query1[current_balance])),(CALCULATE(SUM(Query1[current_balance])
,Query1[Label]= "Revenue", Query1[year] in VALUES(Query1[year]), ALL())),0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
hansaraneda
Helper I
Helper I

Thank you very much for your help, it was the correct solution

amitchandak
Super User
Super User

@hansaraneda , use in

 

% current year2 = DIVIDE(CALCULATE(SUM(Query1[current_balance])),(CALCULATE(SUM(Query1[current_balance])
,Query1[Label]= "Revenue", Query1[year] in VALUES(Query1[year]), ALL())),0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.