Forum Discussion

GerasimosPan's avatar
GerasimosPan
Frequent Visitor
2 years ago

Difference between Power BI Desktop and Power BI Service

I prepared my report using Power BI Desktop and published it to Power BI Service. One of my visuals behaves in a way I did not expect:

 

Behavior:

The visual is supposed to display a time history of a cumulative price, for various groups.

To calculate the cumulative price, I used a measure.

It works perfectly locally.

However, when I publish my report, I see a different graph: It looks like my measure is broken. This is strange, because it works correctly locally.

 

Additional Info:

I use slicers in my page. Apparently the content of the slicer options can affect whether the graph breaks or not.

 

Since my data is sensitive, I tried to produce an MRE. I have not exactly succeeded (i.e. publishing won't directly break the graph, but playing with the filters in power BI Service will eventually break it). I will happily share the MRE if it helps. 

In the meantime, I'll share the code for my measure, as well as two screenshots from Power BI Desktop and Power BI Service, respectively.

 

Cumulative Price =
SUMX(
    VALUES('data'[Group]),
    CALCULATE(
        SUM('data'[Price]),
        FILTER(
            ALLSELECTED('data'),
            'data'[Week] <= MAX('data'[Week])
        )
    )
)

 

 

 

Any help would be greatly appreciated.

9 Replies

    • GerasimosPan's avatar
      GerasimosPan
      Frequent Visitor

      The curious thing is, I have identical visuals (with different values) that work correctly. The solution isn't something as simplified as "measures don't work on power bi service".

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi GerasimosPan ,

    I create a table and make a simple measure, use the measure in the line chart.

    Then I publish it to Power BI.

    It seems I can see the same visual both in desktop and service.

    I think the problem you face may cause by your DAX code. You can use DAX Studio with the service dataset as an XMLA endpoint to check this. Please check this topic for a further study: Solved: Measure works in Power BI Desktop but not after pu... - Microsoft Fabric Community

     

    If it does not help you, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

    How to Get Your Question Answered Quickly 

     

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • GerasimosPan's avatar
      GerasimosPan
      Frequent Visitor

      Hello Anonymous ,

       

      many thanks for the reply. 

       

      Reproducing the issue is a bit tough, because, I am uncertain about what causes it. In my original report I have similar visuals that work perfectly, only two seem to be having this issue. 

       

      I uploaded my attempt at an MRE, you can find it here. Please note that, in contrast to my actual file, publishing will not directly produce a broken visual, but it is guaranteed to break if you take a couple of minutes to check and uncheck the filters (some patience might be required on this bit). My report has two pages, the issue should appear on both of them.

       

      I read the topic you suggested, I don't think this applies to our case here. In that topic the OP was getting an error message, this is not the case here. Also, their issue was fixed by reviewing some date column, this isn't applicable here, as you will see, my x-axis is an integer.

       

      Thank you for your patience!

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi GerasimosPan ,

        I opened your .pbix file and I do some researches on the file. The measure you write means that for each ‘Group’, it sums up the ‘Price’ from the start of the data up to the current week, effectively giving you a running total or cumulative sum of ‘Price’ per ‘Group’ per ‘Week’, so there is a hierarchical relationship between them. 

        Whaterver you change the filter in Desktop or in Service, it will give you different image. I think you need to change the Desktop and Service by the same way.

        When I uncheck all the filters all together, I check them one by one in Desktop and Service and it shows the same image.

         

         

         

         

        Best Regards

        Yilong Zhou

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.