I have a fact table with columns as Quantity, Unit Price, etc. I am trying to calculate the revenue with the SUMX formula but I am getting the same value for all the records. And due to this I am also getting a dependency error in other column. Here is the code:
SUMX(
'''Sales Details$''',
'''Sales Details$'''[Quantity]*'''Sales Details$'''[Unit Price]
)
This table has been imported from SSMS as it is, into the tabular model analysis service in VS2019. I wish to understand few things here-
- Why we have to provide a table inside of 3-quotes? The DAX bar is not taking the table without specifying them under 3-quotes.
- SUMX shouldn't evaluate the same value for all the records. But it is doing here for an unknown reason.
- If I try to replace the [Unit Price] with [Unit Cost] in the upper code then I am getting a dependency error in the new column. As far as I know, I am not using a CALCULATE function which will generate circular dependency and SUMX doesn't puts the filter on columns, [Quantity] here.