Forum Discussion
Anonymous
3 years agoNot applicable
Count items that reach a value threshold
Hi, following my previous discussion here, I need to calculate a measure, that gives a number of products that reach a certain threshold. For example I have 2 tables Table1: Sales_current_mnt...
- 3 years ago
aha, then you need a dimtable and a measure with this:
PlanCheck =VAR TtlValue =SUMX(CurrentMonth, CurrentMonth[Value])+SUMX('PreviousMonth', 'PreviousMonth'[Value])RETURN IF(TtlValue>=250, "Plan exceeded", "Plan OK")model:try to plot a Table Visual with the measure and the Product Column from the dimtable. I tried and it worked like this:
FreemanZ
Super User
3 years agoyes, if your prevmonth table is qualified as a dimtable: the products are unique and covers all the products in currentmonth. if so, you can still use the same code for a measure and plot with the product column from the prevmonth table.
Anonymous
3 years agoNot applicable
Hi, Thank you very much for your clarification! I have the last qustion for this problem yet: how can I create a measure that counts a number of products that ecxeed a threshold.
E.g. in the data above I have only 1 such product (item A) and the measure should return 1 in this case.