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.
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.
Solved! Go to 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.
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.
@mohsin-raza
Can you share the measure(s) where you have used functions to understand how they are contructed?
⭕ 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" )
⭕ 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?
⭕ 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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.