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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Dax fail to get same result on web with Power BI Desktop Version

I wrote a measure to calculate the margin, result is correct on the desktop. But when it is published on the web, the result is wrong.

Here is my measure:

Seg B Margin USD =
    CALCULATE (
        SUMX (
            'Sales Table',
            'Sales Table'[Sales USD] - 'Sales Table'[Cost USD]
        ),
        TREATAS ( VALUES ( 'Seg'[Sales Order] ), 'Sales Table'[Sales Order] ),
        FILTER('Sales Table','Sales Table'[Product Line] = "A"||
        'Sales Table'[Product Line] = "B")
)
 
I use treatas to connect relationship between seg table and sales table, but when it published it calculates data include blank sales order.
Here is data which get web result calculate wrong:
Sales OrderSales Order CatSales QuantitySales USDCost USDProduct LineTime
 000100B9/1/23
 000200B9/1/23
 000300B9/1/23

 

Please note, I have try let different people publish same report in their workspace, issue occurs all the time.

Status: Needs Info

Hi @__KOCO 

Are all the columns in the sample you provided regular columns? You have mentioned two tables seg table and sales table but you have provided data from only one table and there is no way to restore your scenario from my side. Can you provide your pbix file for reference?

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
v-yetao1-msft
Community Support
Status changed to: Needs Info

Hi @__KOCO 

Are all the columns in the sample you provided regular columns? You have mentioned two tables seg table and sales table but you have provided data from only one table and there is no way to restore your scenario from my side. Can you provide your pbix file for reference?

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,
Community Support Team _ Ailsa Tao