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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
feralvarez994
Helper II
Helper II

Help with model

Hi everyone! I have an issue i think with the model, but for sure you gonna know better than me

 

The thing is, i want to create a visualization (horizontal bar chart) with the number of bookings (_Contar autos) by seller (column VE_APELLIDO from VENDE table)), i get the number of bookings with this DAX:

 

_Contar autos = VAR autoosCALCULATE ( COUNT ( AUTOS[AT_COAUTO] ) )
RETURN IF ( ISBLANK ( autoos ), 0, autoos )
 feralvarez994_0-1650558273747.png feralvarez994_1-1650558379154.png

 

 

I have a table in the same dashboard that has the detail with many columns from Autos table and the Seller (VE_APELLIDO), but when i try to make an horizontal bar chart, this happens

 

feralvarez994_2-1650558498641.png

Can someone help me? I think its a model thing, thank you all!

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @feralvarez994 

try to CROSSFILTER the relationship between AUTOS table and the BUCFIN table to "BOTH"

_Contar autos = VAR autoosCALCULATE ( COUNT ( AUTOS[AT_COAUTO] ), CROSSFILTER ( AUTOS[AT_COAUTO], BUCFIN[BUC_COAUTO], BOTH ))
RETURN IF ( ISBLANK ( autoos ), 0, autoos )

 

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @feralvarez994 

try to CROSSFILTER the relationship between AUTOS table and the BUCFIN table to "BOTH"

_Contar autos = VAR autoosCALCULATE ( COUNT ( AUTOS[AT_COAUTO] ), CROSSFILTER ( AUTOS[AT_COAUTO], BUCFIN[BUC_COAUTO], BOTH ))
RETURN IF ( ISBLANK ( autoos ), 0, autoos )

 

thanks bro, you are amazing!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.