Forum Discussion
Anonymous
4 years agoNot applicable
Dax formula - Select value - all except
Good morning, I am trying to create a new column ( example below" created " column is the result I would like to get ). The new column should copy the value of the " DEN" column for each KPI ( takin...
v-chenwuz-msft
4 years agoCommunity Support
Hi Anonymous ,
Column =
VAR _o = [den]
VAR _nns_aff_index =
MAXX (
TOPN (
1,
FILTER ( 'Table', [kpi] = "NNS" ),
ABS ( [Index] - EARLIER ( 'Table'[Index] ) ), ASC
),
[Index]
)
VAR _value =
CALCULATE (
MAX ( 'Table'[num-calc] ),
FILTER ( 'Table', [Index] = _nns_aff_index )
)
RETURN
IF ( [kpi] = "nns aff", _value, _o )
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hello,
how could I change the formula such that it returns as the " den " the sum of the NNS with the same market. screen bellow
the value that should appear in Den for the NNS Aff should be the sum of NNS with the same market :
den should be = 2112
Your formula works however i would like that the formula take into consideration if there is multiple NNS .
| GMHL5 | Cluster | Num - Calc | Den | Nombre | Category | KPI | Month | Year | Sub-Cluster | Period Type | Market | Business Area | Buy-Make-Supply | NUM aff B | Type | old formula | Index | RESULT |
| International | LATAM | 438,1797 | 0 | 1 | MN | NNS | 07 | 2022 | Andina/Platina | 2022 YTD - 07 | Argentina | Medical Nutrition | 438,1797 | YTD | 0 | 409213 | 0 | |
| International | LATAM | 310,1787 | 0 | 1 | VMHS | NNS | 07 | 2022 | Andina/Platina | 2022 YTD - 07 | Argentina | Sundown | 310,1787 | YTD | 0 | 409558 | 0 | |
| International | LATAM | 57,3057 | 0 | 1 | VMHS | NNS | 07 | 2022 | Andina/Platina | 2022 YTD - 07 | Argentina | Osteo Biflex | 57,3057 | YTD | 0 | 409490 | 0 | |
| International | LATAM | 4,5481 | 0 | 1 | VMHS | NNS | 07 | 2022 | Andina/Platina | 2022 YTD - 07 | Argentina | Solgar | 4,5481 | YTD | 0 | 409422 | 0 | |
| International | LATAM | 737,6978 | 0 | 1 | VMHS | NNS | 07 | 2022 | Andina/Platina | 2022 YTD - 07 | Argentina | Nature's Bounty | 737,6978 | YTD | 0 | 409354 | 0 | |
| International | LATAM | 563,6089 | 0 | 1 | CC | NNS | 07 | 2022 | Andina/Platina | 2022 YTD - 07 | Argentina | Consumer Care | 563,6089 | YTD | 0 | 409285 | 0 | |
| International | LATAM | 15,948 | 0 | 1 | MN | NNS Aff | 07 | 2022 | Andina/Platina | 2022 YTD - 07 | Argentina | Medical Nutrition | AFF Balance | -15,948 | YTD | 438,1797 | 409245 | 2111,519 |