Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
i am tyring to change the data format in direct query but unable to do so how do i go about changing something to a text data format without being able to create calculated columns or use the data format part?
@Anonymous , I was able to change the data type from number to text.
I changed the data type of year
@amitchandak & @Greg_Deckler i do not have an opption to change the data type or format. Its not something i can edit it is currently set to teext for the field that is not working please see example below;
Also, you may be able to change the data type in the Query Editor for DirectQuery. You can't in Desktop when not in the Query Editor but you may be able to change the data type while in the Query Editor. But still weird that you are getting that error with COUNT.
@Greg_Deckler no can't use the query editor doesnt give me the option as is analysis data. I tried the COUNTX but get the same error not sure where to go with this now
Also, if you really think it is a bug, what version of Desktop are you using? You could check the Issues forum here:
https://community.powerbi.com/t5/Issues/idb-p/Issues
And if it is not there, then you could post it.
If you have Pro account you could try to open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".
COUNTROWS((FILTER(ALLEXCEPT(table1,table1[country),table1[SalesUnits]>0))
Thanks @Greg_Deckler but i may have solved this it seems it could be down to the relationships in the tabular model as have managed to get the COUNTA to work when using 1 table but when looking at multiple it breaks again
Also, this is very odd, COUNT specifically says it supports Strings.
https://docs.microsoft.com/en-us/dax/count-function-dax
@Greg_Deckler yeah that is what i am really struggling with as it says it should work with it
No, love the user name.
@Greg_Deckler thank you so how would i fix the following calculation;
@Greg_Deckler have tried counta but that doesnt work either as when i put into a table the total of the table is not correct it comes out about 2000 when should be about 100,000
Maybe try a different way of doing that Measure:
CALCULATE(COUNT(Product[Name]),FILTER(table1,table1[SalesUnits]>0),ALLEXCEPT(table1,table1[country]))
instead try:
COUNTX(FILTER(ALLEXCEPT(table1,table1[country),table1[SalesUnits]>0),Product[Name])
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.