Forum Discussion
calculated field
- Anonymous8 years ago
You screenshot is not clear.
Please try the DAX below.TableDifference = CALCULATE(SUM(CdmEtZKenR[Importo]);ALL(CdmEtZKenR)) - CALCULATE(SUM('CdmEtZKenR(2)'[Importo]);ALL('CdmEtZKenR(2)'))
Regards,
Lydia - 8 years ago
It's probably a filter issue, I can see you're trying to filter on just 2018 on that visual but we have no idea what you're doing on the other visuals, that we're using ALL is going to override it
The best way is to use DAX. You can refere below post to refer a solution posted by Eric_Zhang
http://community.powerbi.com/t5/Desktop/Create-a-Calculated-Column-from-Different-Tables/td-p/60453
P.S Accept this as solution if your query is solved
What I would is to create a field with difference between the total 1 and total 2.
- Greg_Deckler8 years agoCommunity Champion
TableDifference = CALCULATE([Importo],ALL(Table1)) - CALCULATE([Importo],ALL(Table2))
Not sure what the table names are for Table1 and Table2 but substitute the right table names.
- jeoosma8 years agoHelper II
?????? what am I doing wrong?
- Greg_Deckler8 years agoCommunity Champion
You are in the Query Editor, you need to be in the Model in Desktop.
Also, if Importo is not a measure, you will need an aggregator (SUM):
TableDifference = CALCULATE(SUM([SomeMeasure]),ALL(Table1)) - CALCULATE(SUM([SomeOtherMeasure]),ALL(Table2))