Forum Discussion
Add measurement results
Nice day
my consultation is as follows: An article, to be prepared, must go through 3 stages (A, B and C). A "responsible" can manufacture multiple items in one day. My fact table records the fields "responsible", "item code", and "date". I made a measure to account for daytime production for each "responsible": Production - DISTINCTCOUNT(Table[Aricle Code]). This measure, when used in conjunction with the "responsible" and "date" fields, work well within the table display, the filter context does its job. However, when production is totalized, the result is not what I expect, since every time a product goes through the 3 stages, the total considers me as "1" and not as "3" (although it is only a product that is made at the end of the day, the production of the item is counted for each person involved; , 3 people-one in each area). That is why I need your support to "add up the results of the measure"... Is it possible to sum the results of a "DISTINCTCOUNT"? or a "COUNTROOWS"? I'm attentive to your answer.
2 Replies
- amitchandak
Super User
CBARRETOF , I did not get completed. But seem like you want total od count distinct
sumx(values(Table[stage]), DISTINCTCOUNT(Table[Aricle Code]))
sumx(summarize(Table,Table[stage],"_1", DISTINCTCOUNT(Table[Aricle Code])),[_1])
I have Used Stage that what i unserstood, but there can be more. Like in summarize you can add group by.
The no, of the group by means till that place it distinctcount after that it will be sum
- CBARRETOFRegular VisitorThe second formula is working for me...Thanks a lot!! I have a question...I think two both formulas should get the same result, but it dont....Why?