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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
mohsin-raza
Helper III
Helper III

Powerbi app is not displaying Powerbi Desktop Dax function results.

In my project task the function "COUNTROWS" displaying results in Powerbi desktop but when it is publishing ,it is not showing  the result with this error msg 

"MdxScript(Model) (66, 89) Calculation error in measure 'Measure Table'[Tax]: A function 'COUNTROWS' has been used in a True/False expression that is used as a table filter expression. This is not allowed."

I used this used function in all measures of the  projekt task.

1 ACCEPTED SOLUTION

Yes, it is solved .

 

I modified the problem ,used the concept "set value as " and "Percent of row total" .It gives me the same result ,which is working on desktop and app.

View solution in original post

8 REPLIES 8
v-xulin-mstf
Community Support
Community Support

Hi @mohsin-raza,

 

Is your issue solved?

Download the .pbix file and save locally,try to open it in desktop to see whether the measure works fine.

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

Yes, it is solved .

 

I modified the problem ,used the concept "set value as " and "Percent of row total" .It gives me the same result ,which is working on desktop and app.

Fowmy
Super User
Super User

@mohsin-raza 

Can you share the measure(s) where you have used functions to understand how they are contructed?

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks for reply. here is the measure 

 

Tax = CALCULATE([total],' Cost '[categori]="Tax" && COUNTROWS(FILTERS(' calender'[year])),ALLSELECTED('calender') )

 

I am calculating "Tax " paid by Vechicals in selected  years.(Tax by Year) 

@mohsin-raza 

I am not sure how you are implementing this measure in your project. if you want to get the TAX total for each year you can simply do the following 

Tax = CALCULATE( [total], ' Cost '[categori]="Tax" )

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

you are right!

in this task ,i  am making further analysis by taking "Which type of vechical paid  more  Tax in % " in each "Selected Year".

It works very fine in BI desktop .when i publish it ,i got the msg which i mentioned in my problem.

   

@mohsin-raza 

Did you modify the measure and publish it again to check the error?

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Not yet!

I am looking for some solution to remove this error.

It is not one  category "Tax". The table conatins also other categories like  "insurance"," road taxes"  and more  of each vechical The same concept is used behind each category.

 

Again its work very fine in desktop not on App.i can explore the solution if not i will modify measure and test again. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

Users online (1,915)