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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Custom Visual Measure field doesn't work

Hey all,

 

I am developing a custom visual and I am testing it in the developer visual on PBI service. I am trying to set up a measure field that accepts a DAX query in our DataModel. So the DAX query is 

'Count of Vehicles = if(ISBLANK(distinctcount(Vehicles[Id])),"0",DISTINCTCOUNT(Vehicles[Id]))'
However, I printed the values array from the measure and it just contains 0s. I noticed this is because the queryname for this measure field is "Count of Vehicles". Whenever I add my own query into the measure field (e.g. Count of vehicleID) it works and the query name is literally the query itself. I suspect it has something to do with this.
 
 
Any help is appreciated.
 
 
 
EDIT: So I've done a little more investigation and I've learned that whenever I have different columns in the categories field, it changes the measure field. If there are no categories in the category field, the measure data returns the value as expected. Is there a way to decouple the measure field from the category field?
0 REPLIES 0

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors