cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mohsin-raza
Frequent Visitor

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.

View solution in original post

Fowmy
Super User IV
Super User IV

@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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.