Forum Discussion
Approach to complex scenario modelling/measures
Hi duffby2 ,
1. Create a calculated column to get each supplier's percentage of total revenue.
Supplier Revenue % =
DIVIDE(
SUMX(FILTER('Table', 'Table'[Supplier] = EARLIER('Table'[Supplier]))), 'Table'[Revenue]),
1000
)
2. Return pass or fail depending on the percentage.
Restriction 1 Status = IF('Table'[Supplier Revenue %] > 0.1, "Fail", "Pass")
3. Calculate each restriction in turn.
Region Revenue % =
DIVIDE(
SUMX(FILTER('Table', 'Table'[Region] = EARLIER('Table'[Region]))), 'Table'[Revenue]),
1000
)
Restriction 2 Status = IF('Table'[Region Revenue %] > 0.5, "Fail", "Pass")
Product Revenue % =
DIVIDE(
SUMX(FILTER('Table', 'Table'[Product] = EARLIER('Table'[Product]) && 'Table'[Region] = EARLIER('Table'[Region]))), 'Table'[Revenue]),
1000
)
Restriction 3 Status = IF('Table'[Product Revenue %] > 0.05, "Fail", "Pass")
4. Create the calculated column to get the final status.
Column =
IF('Table'[Restriction 1 Status] = "Pass" && 'Table'[Restriction 2 Status] = "Pass" && 'Table'[Restriction 3 Status] = "Pass", "Pass", "Fail")
5. I do not know what the table "*" means, so I will treat it as the same category to calculate, but the overall idea as described above, you can according to their own needs slightly modified.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Clara,
Thank you very much for your reply. This approach would certainly work but the only concern would be the number of calculated columns I would have to create as there are over 100 such restrictions to be calculated.
I had hoped I would be able to maintain some form of parameter table that contains all the restrctions and then have measures use the values in this "parameter table" to perform the various calculations required on the restrictions. Not sure that is possible though.
The "*" means all for that particular attribute - so for the first record in my table, it means that all products/regions are considered for each supplier. Sorry, I should have have made that clearer.