Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Total row with wrong results in SQL Analysis Services database live connection

Hello all,

 

I'm facing a huge problem while trying to bring the correct values to a total row in a table. 

I'm live connected (Direct Query) to a SQL Analysis Services database and this limit my options to solve this issue. I cannot add new columns, cannot add new tables and this is why I've been looking for an alternative solution to this problem.

 

I've added a table containing several columns, and the totals won't show the correct information. I know that PBI have some trouble getting the context of the data, but I'm struggling to make PBI understand it.

 

I'm going to use an Excel table as an example, but imagine the following situation happening on Power BI:

 

 

 

 

 

 

 

 

 

 

 

 

The column "Value RAW" comes straight from the database as a measure. The column "Value (Non Negatives)" is a calculated measure as this:

 

Value (Non Negatives) =
    CALCULATE(
    SUMX(table_name
    ,IF([Value RAW]>0
    ,[Value RAW]]
    ,BLANK())
    )  
)

 

The row "Total" is what PBI is delivering to me, I'd like that this row showed the same values as the "Expected Value" row. 

 

The main goal is to show only the sum of the positive values in the Total Row, or even the correct value.

 

One important information is that most of the data is stored in the database as "measures" and not as columns.

 

Would you help me? I really appreciate any help.

 

Thank you in advance

 

Henrique

3 Replies