cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

unable to call the source column without using aggregate functions in measure

unable to call the source column without using aggregate functions in measure...

 

im creating measure and i dont want to use SUM or aggregate functions for MRP_AVAIL_USD_AMT column in measure...

 

thimmaraju_0-1626763249230.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , measure mean aggregated value, so you have to some operation like sum , min or max on MRP_AVAIL_USD_AMT 

 

If needed you can create a new column. Only if test is not a measure

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , measure mean aggregated value, so you have to some operation like sum , min or max on MRP_AVAIL_USD_AMT 

 

If needed you can create a new column. Only if test is not a measure

Anonymous
Not applicable

Yes @Amit

 

you are correct..but if i use calculated column then slicer selection filter calculations will not apply 

 

but if i use measure then slicer selection will apply on measure only...below is the dax which im using 

 

MRP_AVAIL_USD_AMT_SINGLE_mea =
// var maxCol =
// CALCULATE(MAX(AZSAT_SHPMT_INVEN_WKLY_VW[Index]), ALLEXCEPT(AZSAT_SHPMT_INVEN_WKLY_VW,AZSAT_SHPMT_INVEN_WKLY_VW[SFU_MATL_ID],AZSAT_SHPMT_INVEN_WKLY_VW[FPC_ID],AZSAT_SHPMT_INVEN_WKLY_VW[fy_mth_id]) )

var test =

CALCULATE(
MAX(
AZSAT_SHPMT_INVEN_WKLY_VW[Index]
),
ALLEXCEPT(
AZSAT_SHPMT_INVEN_WKLY_VW,
AZSAT_SHPMT_INVEN_WKLY_VW[SFU_MATL_ID], AZSAT_SHPMT_INVEN_WKLY_VW[FPC_ID], AZSAT_SHPMT_INVEN_WKLY_VW[fy_mth_id]
),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[BRAND_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[CUST_LVL_4_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[SUB_TRADE_CHANL_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_1_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_2_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_3_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_4_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_5_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_6_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_7_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_8_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[PROFT_CTR_LVL_5_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[LOCAL_DFU_STTUS_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[LOCAL_MATL_STTUS_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[CATEG_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[CSU_IND])
,FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[Geolevel_sl]),

FILTERS('distinct subsector'[Subsector]),

FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[SelectedMarket])
)

return if(test= MAX(AZSAT_SHPMT_INVEN_WKLY_VW[Index]),SUM(AZSAT_SHPMT_INVEN_WKLY_VW[MRP_AVAIL_USD_AMT]))
 

 

Helpful resources

Announcements
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors