Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I want to calculate the cost of all campagins belonging to a category in relation of the signed contracts of a similar category in a different table.
The cost are summarized in a campaign table. Each Campaign has a product it advertises. As a purchase facilitated by a campaign does not garantie that the product is of the same category the category of the product is logged in the purchase('Käufe') table.
Both categories share the categories which are of interest ("Strom" and "Gas").
These are the mearues I already tried.
CPO Paid = var tt = SELECTEDVALUE('Käufe'[Product Category];"ALL")
var budget = IF(tt="ALL";SUM('Datenbasierte Kampangien comb'[Cost]);CALCULATE(SUM('Datenbasierte Kampangien comb'[Cost]);FILTER(ALL('Kampagnen Zuordnung');'Kampagnen Zuordnung'[Vertragstyp]=tt)))//CALCULATE(SUM('Datenbasierte Kampangien comb'[Cost]);Filter('Datenbasierte Kampangien comb';SELECTEDVALUE('Käufe'[Product Category])="Strom");ALL('Käufe'[Product Category]))//if(SELECTEDVALUE('Käufe'[Product Category])="";SUM('Datenbasierte Kampangien comb'[Cost]);CALCULATE(SUM('Datenbasierte Kampangien comb'[Cost]);FILTER(ALL('Datenbasierte Kampangien comb'[Cost]);'Kampagnen Zuordnung'[Vertragstyp]="Strom");'Kampagnen Zuordnung'[Vertragstyp2]="Strom/gas"))
//; Filter(ALL('Kampagnen Zuordnung');'Kampagnen Zuordnung'[Vertragstyp]='Kampagnen Zuordnung'[Quelle]))
return budget//DIVIDE(budget;[Paid Abschlüsse];0)
I want to keep the calculation dynamic to allow easy changes in the future
Solved! Go to Solution.
Managed to solve it. Had to first remove the filter applied by the visual with ALL() and then apply my own filter.
Managed to solve it. Had to first remove the filter applied by the visual with ALL() and then apply my own filter.
hi @Anonymous
It's pleasant that your problem has been solved, please accept the reply as solution, that way, other community members will easily find the solution when they get same issue.
Regards,
Lin
User | Count |
---|---|
82 | |
76 | |
71 | |
69 | |
54 |
User | Count |
---|---|
105 | |
100 | |
91 | |
79 | |
68 |