Forum Discussion

mohsin-raza's avatar
mohsin-raza
Icon for Helper III rankHelper III
5 years ago
Solved

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.

  • mohsin-raza's avatar
    mohsin-raza
    5 years ago

    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.

8 Replies

  • mohsin-raza 

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

    • mohsin-raza's avatar
      mohsin-raza
      Icon for Helper III rankHelper III

      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) 

      • Fowmy's avatar
        Fowmy
        Icon for Super User rankSuper User

        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" )

  • v-xulin-mstf's avatar
    v-xulin-mstf
    Icon for Community Support rankCommunity 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!

    • mohsin-raza's avatar
      mohsin-raza
      Icon for Helper III rankHelper III

      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.