Forum Discussion
Ideas for Measure
Hi Julia2023 What I understood about your Goal measure in your provided image, that it is calculating cumulative sum of position based on product ID.
If this is the case, then you should rank your position decending order and evaluate cumulative sum. You can try below 2 measure.
Rank Measure:
ProductKeyRank =
RANKX(
ALLSELECTED(DimProduct[ProductKey]),
[Position],
,
DESC,
DENSE
)
We will filter product table based on this rank and feed this table to calculate function to sum up position to construct 100%.
Goal Measure:
Goal =
VAR CurrentRank = [ProductKeyRank]
RETURN
CALCULATE(
[Position],
FILTER(
ALLSELECTED(DimProduct[ProductKey]),
[ProductKeyRank] <= CurrentRank
)
)
Change column name according to your table column name. You could rank any dimension based on this technique and conduct cumulative sum.
Here is the output of my goal measure:
You can avoid total level by using inscope or hasonevalue function.
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
Thank you for the idea. It works when using a filter, but without any filter, loading and nothing... maybe it's because have more than 180k product IDs