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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors