Forum Discussion
Dealing with Measure Totals
Ashish_Mathur it looked like you were able to solve a good bit of these similarly related items. I have this script for a measure shared below. The measure works as expected in one scenario. When I drill through to a page that groups the "category" in groups of more than 1.
When i am in my "home" page and i click on the table that has my measure, the totals show as expected and sum correctly. Does anything stand out about this measure that would prevent the drill through working only when groups are established?
- Ashish_Mathur1 year ago
Super User
Hi,
I cannot understand anything from the image there.
- Looking4PBICont1 year agoFrequent Visitor
Ashish_Mathur the measure has notes in it where you see they "//".
basically i have one "DailyTotals" table that has three kinds of CostTypes, A,B,C.
CostTypeA= total cost where DailyTotals[ServiceDesciption]="p1"
CostTypeB= total cost where DailyTotals[ServiceDesciption]="p2"
CostTypeC= total cost where DailyTotals[ServiceDesciption] not in ("p1","p2")
flatcost=10
DailyTotals relates to a "Dates" table.
DailyTotals[Project] is used as a key to relate to another table "DTable". DTable[Name] is an attribute based on the project. DailyTotals[Project] is null for costTypeA but not CostTypeC. For CostTypeB it can be null.
Because CostTypeA often has no [Project] and therefor no DTable[Name], i need to conditionally over write the context to reapply CostTypeA based on DTable[Name] that had costTypeC in the respective month.
CostTypeCMonthly% = CostTypeC / total CostTypeC number × 100 **this needs to be by month***
(total CostTypeA - flatcost) * CostTypeCMonthly%
Goal*obtain the monthly % share of CostTypeC where TypeC>0, multiply that by the total CostTypeA